mirror of
https://github.com/alsa-project/alsa-lib.git
synced 2025-11-07 13:30:07 -05:00
Fixes S16 byte swapping with generic dmix code
Here's a patch for generic dmix which fixes S16 byte swapping. Tested on powerpc with snd-usb-audio. (Without the patch I get crackling.) Signed-off-by: Juergen Kreileder <jk@blackdown.de>
This commit is contained in:
parent
5c0674aee3
commit
8ef339762a
1 changed files with 2 additions and 2 deletions
|
|
@ -194,7 +194,7 @@ static void mix_areas1_swap(unsigned int size,
|
|||
register signed int sample;
|
||||
|
||||
for (;;) {
|
||||
sample = bswap_16(*src);
|
||||
sample = (signed short) bswap_16(*src);
|
||||
if (! *dst) {
|
||||
*sum = sample;
|
||||
*dst = *src;
|
||||
|
|
@ -205,7 +205,7 @@ static void mix_areas1_swap(unsigned int size,
|
|||
sample = 0x7fff;
|
||||
else if (sample < -0x8000)
|
||||
sample = -0x8000;
|
||||
*dst = bswap_16((signed short)sample);
|
||||
*dst = (signed short) bswap_16((signed short) sample);
|
||||
}
|
||||
if (!--size)
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue