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
This commit is contained in:
Ian Dowse 2003-08-23 12:18:30 +00:00
parent e5282aea6b
commit 72d173fa8f

View File

@ -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;