From 355d18a593c4e79aae733dbd0bb3157b3b5f7014 Mon Sep 17 00:00:00 2001 From: "J. Alexander Treuman" 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/pcm_utils.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/pcm_utils.h') diff --git a/src/pcm_utils.h b/src/pcm_utils.h index 800ac27f4..2c6610a75 100644 --- a/src/pcm_utils.h +++ b/src/pcm_utils.h @@ -48,9 +48,9 @@ void pcm_volumeChange(char *buffer, int bufferSize, AudioFormat * format, void pcm_mix(char *buffer1, char *buffer2, size_t bufferSize1, size_t bufferSize2, AudioFormat * format, float portion1); -void pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, - size_t inSize, AudioFormat * outFormat, - char *outBuffer, ConvState *convState); +size_t pcm_convertAudioFormat(AudioFormat * inFormat, char *inBuffer, + size_t inSize, AudioFormat * outFormat, + char *outBuffer, ConvState *convState); size_t pcm_sizeOfConvBuffer(AudioFormat * inFormat, size_t inSize, AudioFormat * outFormat); -- cgit v1.2.3