From dda16ee1fbe681ad747210aaea7727a3378c9af2 Mon Sep 17 00:00:00 2001 From: wm4 Date: Wed, 21 Oct 2015 18:54:48 +0200 Subject: ao_coreaudio_exclusive: deal with devices return different channel count If the device returns an unexpected number of channels instead of the requested count on init, don't immediately error out. Instead, look if there's a channel map with the given number of channels. If there isn't, still error out, because we don't want to guess the channel layout. --- audio/out/ao_coreaudio_chmap.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'audio/out/ao_coreaudio_chmap.h') diff --git a/audio/out/ao_coreaudio_chmap.h b/audio/out/ao_coreaudio_chmap.h index ce31975b6d..a67e1dc252 100644 --- a/audio/out/ao_coreaudio_chmap.h +++ b/audio/out/ao_coreaudio_chmap.h @@ -20,6 +20,10 @@ #include +struct mp_chmap; + bool ca_init_chmap(struct ao *ao, AudioDeviceID device); +void ca_get_active_chmap(struct ao *ao, AudioDeviceID device, int channel_count, + struct mp_chmap *out_map); #endif -- cgit v1.2.3