summaryrefslogtreecommitdiffstats
path: root/audio/out/ao_coreaudio_utils.h
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-04-29 22:39:39 +0200
committerwm4 <wm4@nowhere>2015-04-29 23:06:10 +0200
commit32b835c03b4dc98a0344d171adef36c7562f1e7b (patch)
tree89b06b396ce52ea203b4db45aafdcbdc756831cd /audio/out/ao_coreaudio_utils.h
parent3295ce48ab4badff0e13e2e9c2a1ec945413d4e2 (diff)
downloadmpv-32b835c03b4dc98a0344d171adef36c7562f1e7b.tar.bz2
mpv-32b835c03b4dc98a0344d171adef36c7562f1e7b.tar.xz
ao_coreaudio_utils: add function for ASBD -> mp format lookup
Useful with some of the following commits. ca_fill_asbd() should behave exactly as before. Instead of actually implementing the inverse function of ca_fill_asbd(), just loop over the (small) list of mpv functions and check if any mpv equivalent to a given ASBD exists.
Diffstat (limited to 'audio/out/ao_coreaudio_utils.h')
-rw-r--r--audio/out/ao_coreaudio_utils.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/audio/out/ao_coreaudio_utils.h b/audio/out/ao_coreaudio_utils.h
index bd233e4b22..b5f8e7f2ba 100644
--- a/audio/out/ao_coreaudio_utils.h
+++ b/audio/out/ao_coreaudio_utils.h
@@ -55,6 +55,9 @@ OSStatus ca_select_device(struct ao *ao, char* name, AudioDeviceID *device);
void ca_fill_asbd(struct ao *ao, AudioStreamBasicDescription *asbd);
void ca_print_asbd(struct ao *ao, const char *description,
const AudioStreamBasicDescription *asbd);
+bool ca_asbd_equals(const AudioStreamBasicDescription *a,
+ const AudioStreamBasicDescription *b);
+int ca_asbd_to_mp_format(const AudioStreamBasicDescription *asbd);
int64_t ca_frames_to_us(struct ao *ao, uint32_t frames);
int64_t ca_get_latency(const AudioTimeStamp *ts);