Skip to contentSkip to conversation

pcm: dmix: fix wrong scaling in 32bits pcm mixing

DISCUSSION GitHub pull_request - edited 1 participant 1 message Apr 28, 2022 1 message not in the archive

lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive

alsa-project/alsa-lib pull request #222 was edited from katsuster:

Generic mixing function for 32bits pcm has used 8bits right shift for pre-scaling. But this is generating wrong result if pcm data is negative value because return value type of bswap_32() is unsigned int.

This patch adds type cast bswap_32() result to signed int.

Request URL : https://github.com/alsa-project/alsa-lib/pull/222
Patch URL : https://github.com/alsa-project/alsa-lib/pull/222.patch
Repository URL: https://github.com/alsa-project/alsa-lib