aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-05-26 16:39:55 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-05-26 16:39:55 +0000
commit355d18a593c4e79aae733dbd0bb3157b3b5f7014 (patch)
treea7e4227dde83330eed683c37621a6544811ee94f /src/audioOutput.c
parentb3726bcc93c4d7eb8b2b7a4e37a76b467b5bfd29 (diff)
downloadmpd-355d18a593c4e79aae733dbd0bb3157b3b5f7014.tar.gz
mpd-355d18a593c4e79aae733dbd0bb3157b3b5f7014.tar.xz
mpd-355d18a593c4e79aae733dbd0bb3157b3b5f7014.zip
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
Diffstat (limited to 'src/audioOutput.c')
-rw-r--r--src/audioOutput.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c
index ccc701451..9f6172088 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -205,14 +205,12 @@ static void convertAudioFormat(AudioOutput * audioOutput, char **chunkArgPtr,
audioOutput->convBufferLen = size;
}
- pcm_convertAudioFormat(&(audioOutput->inAudioFormat),
- *chunkArgPtr,
- *sizeArgPtr,
- &(audioOutput->outAudioFormat),
- audioOutput->convBuffer,
- &audioOutput->convState);
-
- *sizeArgPtr = size;
+ *sizeArgPtr = pcm_convertAudioFormat(&(audioOutput->inAudioFormat),
+ *chunkArgPtr, *sizeArgPtr,
+ &(audioOutput->outAudioFormat),
+ audioOutput->convBuffer,
+ &audioOutput->convState);
+
*chunkArgPtr = audioOutput->convBuffer;
}