From 2c39948a5b146f8bd24872e14d7570460f7af899 Mon Sep 17 00:00:00 2001 From: Andreas Claesson Date: Sun, 29 May 2005 21:31:59 +0000 Subject: Fixed bug in conversion from mono to stereo. git-svn-id: https://svn.musicpd.org/mpd/branches/ancl@3297 09075e82-0dd4-0310-85a5-a0d7c8717e4f --- src/pcm_utils.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/pcm_utils.c') diff --git a/src/pcm_utils.c b/src/pcm_utils.c index 1dbc7b3a0..3f9f61969 100644 --- a/src/pcm_utils.c +++ b/src/pcm_utils.c @@ -402,8 +402,8 @@ void pcm_convertAudioFormat(AudioFormat * inFormat, char * inBuffer, size_t case 1: { /* in reverse order to allow for same in and out buffer */ - mpd_fixed_t *in = ((mpd_fixed_t *)dataConv)+inFrames; - mpd_fixed_t *out = ((mpd_fixed_t *)convBuffer)+(inFrames<<1); + mpd_fixed_t *in = ((mpd_fixed_t *)dataConv) + outFrames - 1; + mpd_fixed_t *out = ((mpd_fixed_t *)convBuffer) + outSamples - 1; int f = outFrames; while(f--) { *out-- = *in; -- cgit v1.2.3