diff options
author | iedowse <iedowse@FreeBSD.org> | 2003-08-23 12:18:30 +0000 |
---|---|---|
committer | iedowse <iedowse@FreeBSD.org> | 2003-08-23 12:18:30 +0000 |
commit | e9326e0b09fccf6fcc7a8cacfc59facea165dde3 (patch) | |
tree | 4189ac11d034e3a5cab59fc19ba7183c2ec27360 /sys | |
parent | a48e8d72dc68145f37493552d623dc19f16c625e (diff) | |
download | FreeBSD-src-e9326e0b09fccf6fcc7a8cacfc59facea165dde3.zip FreeBSD-src-e9326e0b09fccf6fcc7a8cacfc59facea165dde3.tar.gz |
Fix an off-by-one error in feed_monotostereo16() that caused the
first sample in the buffer to be ignored. The bug caused a repetitive
glitch in one of the stereo channels when playing mono sound on
configurations that use the monotostereo16 feeder.
Reviewed by: orion
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/sound/pcm/feeder_fmt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/dev/sound/pcm/feeder_fmt.c b/sys/dev/sound/pcm/feeder_fmt.c index 286903f3..f0c5d28 100644 --- a/sys/dev/sound/pcm/feeder_fmt.c +++ b/sys/dev/sound/pcm/feeder_fmt.c @@ -291,7 +291,7 @@ feed_monotostereo16(struct pcm_feeder *f, struct pcm_channel *c, u_int8_t *b, u_ j = k - 1; i = j * 2 + 1; - while (i > 3 && j >= 1) { + while (i >= 3 && j >= 1) { x = b[j--]; y = b[j--]; b[i--] = x; |