mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-29 05:40:27 -04:00
pulse-server: limit the aux channels to 32
PulseAudio does not have more than 32 AUX channels so when we generate them from unknown positions, make sure we wrap around. See #1033
This commit is contained in:
parent
33ddd5f760
commit
225c9ebc2d
1 changed files with 2 additions and 2 deletions
|
|
@ -378,7 +378,7 @@ static inline enum channel_position channel_id2pa(uint32_t id, uint32_t *aux)
|
|||
if (id == audio_channels[i].channel)
|
||||
return i;
|
||||
}
|
||||
return CHANNEL_POSITION_AUX0 + (*aux)++;
|
||||
return CHANNEL_POSITION_AUX0 + ((*aux)++ & 31);
|
||||
}
|
||||
|
||||
static inline const char *channel_id2paname(uint32_t id, uint32_t *aux)
|
||||
|
|
@ -389,7 +389,7 @@ static inline const char *channel_id2paname(uint32_t id, uint32_t *aux)
|
|||
audio_channels[i].name != NULL)
|
||||
return audio_channels[i].name;
|
||||
}
|
||||
return audio_channels[CHANNEL_POSITION_AUX0 + (*aux)++].name;
|
||||
return audio_channels[CHANNEL_POSITION_AUX0 + ((*aux)++ & 31)].name;
|
||||
}
|
||||
|
||||
static inline uint32_t channel_paname2id(const char *name, size_t size)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue