mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
acp: ensure we don't make invalid channels
There are only 32 AUX channels in pulseaudio so wrap around when we have more.
This commit is contained in:
parent
6bb21d6abf
commit
9dccd79191
1 changed files with 1 additions and 1 deletions
|
|
@ -194,7 +194,7 @@ static inline pa_channel_map* pa_channel_map_init_extend(pa_channel_map *m,
|
|||
if (pa_channel_map_init_auto(m, c, def) == NULL)
|
||||
continue;
|
||||
for (i = 0; c < channels; c++, i++)
|
||||
m->map[c] = PA_CHANNEL_POSITION_AUX0 + i;
|
||||
m->map[c] = PA_CHANNEL_POSITION_AUX0 + (i & 31);
|
||||
m->channels = (uint8_t) channels;
|
||||
return m;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue