mirror of
https://github.com/mpv-player/mpv.git
synced 2025-12-28 05:33:14 +00:00
ao_coreaudio: support native mono output
We can be pretty sure that AudioUnit will remix for us. Before this commit, we usually upmixed to stereo, because the stereo and multichannel layouts were the only whitelisted ones.
This commit is contained in:
@@ -241,6 +241,8 @@ bool ca_init_chmap(struct ao *ao, AudioDeviceID device)
|
|||||||
struct mp_chmap_sel chmap_sel = {.tmp = ta_ctx};
|
struct mp_chmap_sel chmap_sel = {.tmp = ta_ctx};
|
||||||
struct mp_chmap chmap = {0};
|
struct mp_chmap chmap = {0};
|
||||||
|
|
||||||
|
mp_chmap_sel_add_map(&chmap_sel, &(struct mp_chmap)MP_CHMAP_INIT_MONO);
|
||||||
|
|
||||||
AudioChannelLayout *ml = ca_query_layout(ao, device, ta_ctx);
|
AudioChannelLayout *ml = ca_query_layout(ao, device, ta_ctx);
|
||||||
if (ml && ca_layout_to_mp_chmap(ao, ml, &chmap))
|
if (ml && ca_layout_to_mp_chmap(ao, ml, &chmap))
|
||||||
mp_chmap_sel_add_map(&chmap_sel, &chmap);
|
mp_chmap_sel_add_map(&chmap_sel, &chmap);
|
||||||
|
|||||||
Reference in New Issue
Block a user