aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Claesson <andreas.claesson@gmail.com>2005-05-29 21:31:59 +0000
committerAndreas Claesson <andreas.claesson@gmail.com>2005-05-29 21:31:59 +0000
commit2c39948a5b146f8bd24872e14d7570460f7af899 (patch)
tree40d86e934f2926d50bd730decd26db3d1c0611f1
parent585a675f48bea2cebd87015505c12931f3aefbf9 (diff)
downloadmpd-2c39948a5b146f8bd24872e14d7570460f7af899.tar.gz
mpd-2c39948a5b146f8bd24872e14d7570460f7af899.tar.xz
mpd-2c39948a5b146f8bd24872e14d7570460f7af899.zip
Fixed bug in conversion from mono to stereo.
git-svn-id: https://svn.musicpd.org/mpd/branches/ancl@3297 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/pcm_utils.c4
1 files changed, 2 insertions, 2 deletions
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;