From 355d18a593c4e79aae733dbd0bb3157b3b5f7014 Mon Sep 17 00:00:00 2001
From: "J. Alexander Treuman" <jat@spatialrift.net>
Date: Sat, 26 May 2007 16:39:55 +0000
Subject: Make pcm_convertAudioFormat return the buffer size.  This is
 necessary because lsr may return less than the input buffer size, and the
 rest of the audio code needs to know the new size.  This fixes the clicking
 that was introduced with recent changes to the lsr code.  A huge thanks to
 remiss for figuring this out.

git-svn-id: https://svn.musicpd.org/mpd/trunk@6273 09075e82-0dd4-0310-85a5-a0d7c8717e4f
---
 src/outputBuffer.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

(limited to 'src/outputBuffer.c')

diff --git a/src/outputBuffer.c b/src/outputBuffer.c
index d9cbcdc60..c7ff8b479 100644
--- a/src/outputBuffer.c
+++ b/src/outputBuffer.c
@@ -89,9 +89,9 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream,
 			convBufferLen = datalen;
 		}
 		data = convBuffer;
-		pcm_convertAudioFormat(&(dc->audioFormat), dataIn, dataInLen,
-		                       &(cb->audioFormat), data,
-		                       &(cb->convState));
+		datalen = pcm_convertAudioFormat(&(dc->audioFormat), dataIn,
+		                                 dataInLen, &(cb->audioFormat),
+		                                 data, &(cb->convState));
 	}
 
 	if (replayGainInfo && (replayGainState != REPLAYGAIN_OFF))
-- 
cgit v1.2.3