mirror of
https://github.com/mpv-player/mpv
synced 2024-12-23 23:32:26 +00:00
ao_alsa: if possible, reorder device maps to std layouts
Channel maps reported by the device as SND_CHMAP_TYPE_VAR can be freely reordered. We don't use this much (out of laziness), but in this case it's a simple way to reduce necessary reordering (which would be an extra libavresample invocation), and to make debug output more readable.
This commit is contained in:
parent
5b269ce696
commit
6cc02658fa
@ -306,6 +306,8 @@ static bool query_chmaps(struct ao *ao, struct mp_chmap *chmap)
|
||||
mp_chmap_from_alsa(&entry, &maps[i]->map);
|
||||
|
||||
if (mp_chmap_is_valid(&entry)) {
|
||||
if (maps[i]->type == SND_CHMAP_TYPE_VAR)
|
||||
mp_chmap_reorder_norm(&entry);
|
||||
MP_VERBOSE(ao, "Got supported channel map: %s (type %s)\n",
|
||||
mp_chmap_to_str(&entry),
|
||||
snd_pcm_chmap_type_name(maps[i]->type));
|
||||
|
Loading…
Reference in New Issue
Block a user