From 85f2ce820f7299c1b10ce71c606dfc0f36e7fc74 Mon Sep 17 00:00:00 2001 From: Warren Dukes Date: Mon, 10 May 2004 19:30:56 +0000 Subject: fix a bug in channel conversion git-svn-id: https://svn.musicpd.org/mpd/trunk@975 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/pcm_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pcm_utils.c b/src/pcm_utils.c index c1be8d167..e7872a272 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -197,7 +197,7 @@ void pcm_convertAudioFormat(AudioFormat * inFormat, char * inBuffer, size_t { mpd_sint16 * in = (mpd_sint16 *)dataBitConv; mpd_sint16 * out = (mpd_sint16 *)dataChannelConv; - int i, inSamples = dataChannelLen >> 1; + int i, inSamples = dataBitLen >> 1; for(i=0;isampleRate)) / inFormat->sampleRate); nlen <<= shift; - in_samples = inSize >> shift; + in_samples = dataChannelLen >> shift; out_samples = nlen >> shift; delta = (in_samples << 12) / out_samples; for(x = 0, i = 0; i < out_samples; i++) { -- cgit v1.2.3