mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
SSE/MMX/ARM: Fix high frequency noise with unusual number of channels
In the assembly optimized versions of SSE, a noise could occur when the number of channels were 3,5,6 or 7. For MMX and ARM, this could occur when the number of channels were 3. Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
489f50e2f4
commit
4d84a00b49
3 changed files with 25 additions and 13 deletions
|
|
@ -100,9 +100,10 @@ pa_volume_s16ne_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi
|
|||
{
|
||||
pa_reg_x86 channel, temp;
|
||||
|
||||
/* the max number of samples we process at a time, this is also the max amount
|
||||
* we overread the volume array, which should have enough padding. */
|
||||
channels = PA_MAX (4U, channels);
|
||||
/* Channels must be at least 4, and always a multiple of the original number.
|
||||
* This is also the max amount we overread the volume array, which should
|
||||
* have enough padding. */
|
||||
channels = channels == 3 ? 6 : PA_MAX (4U, channels);
|
||||
|
||||
__asm__ __volatile__ (
|
||||
" xor %3, %3 \n\t"
|
||||
|
|
@ -166,9 +167,10 @@ pa_volume_s16re_mmx (int16_t *samples, int32_t *volumes, unsigned channels, unsi
|
|||
{
|
||||
pa_reg_x86 channel, temp;
|
||||
|
||||
/* the max number of samples we process at a time, this is also the max amount
|
||||
* we overread the volume array, which should have enough padding. */
|
||||
channels = PA_MAX (4U, channels);
|
||||
/* Channels must be at least 4, and always a multiple of the original number.
|
||||
* This is also the max amount we overread the volume array, which should
|
||||
* have enough padding. */
|
||||
channels = channels == 3 ? 6 : PA_MAX (4U, channels);
|
||||
|
||||
__asm__ __volatile__ (
|
||||
" xor %3, %3 \n\t"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue