From 7fc78023587e6cb238d5fa16f5acafb4078c6798 Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 3 Mar 2014 09:00:59 +0100 Subject: pcmconv: fix dither clipping the check in dither() was inverted. we should only add noise when the output bit count is greater than input bit count (samples shifted up) to fill the lower zero bits produced by the shift. --- sys/src/cmd/audio/pcmconv/pcmconv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/src/cmd/audio/pcmconv/pcmconv.c b/sys/src/cmd/audio/pcmconv/pcmconv.c index f86bfa59a..0c9cba35c 100644 --- a/sys/src/cmd/audio/pcmconv/pcmconv.c +++ b/sys/src/cmd/audio/pcmconv/pcmconv.c @@ -209,7 +209,7 @@ dither(int *y, int ibits, int obits, int count) { static ulong prnd; - if(ibits >= 32 || obits >= ibits) + if(ibits >= 32 || ibits >= obits) return; while(count--){ -- cgit v1.2.3