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
This commit is contained in:
J. Alexander Treuman
2007-05-26 16:39:55 +00:00
parent b3726bcc93
commit 355d18a593
4 changed files with 31 additions and 30 deletions

View File

@@ -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);