diff options
author | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-22 23:11:36 +0000 |
---|---|---|
committer | J. Alexander Treuman <jat@spatialrift.net> | 2007-05-22 23:11:36 +0000 |
commit | 407497c40a34ae299cca56de1bd7c92e5724c54a (patch) | |
tree | deadb344cb967157fd97e3a80dac525bb3f651d8 /src/outputBuffer.c | |
parent | e6d7663b10242d1cb9ad0411dbb45502db154b76 (diff) | |
download | mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.tar.gz mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.tar.xz mpd-407497c40a34ae299cca56de1bd7c92e5724c54a.zip |
Split pcm_convertAudioFormat into separate functions for bitrate, channel,
and samplerate conversion. This makes the code much easier to read, and
fixes a few bugs that were previously there.
git-svn-id: https://svn.musicpd.org/mpd/trunk@6224 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r-- | src/outputBuffer.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/outputBuffer.c b/src/outputBuffer.c index 8b3a00b0e..36e15a78f 100644 --- a/src/outputBuffer.c +++ b/src/outputBuffer.c @@ -82,13 +82,8 @@ int sendDataToOutputBuffer(OutputBuffer * cb, InputStream * inStream, data = dataIn; datalen = dataInLen; } else { - datalen = - pcm_sizeOfOutputBufferForAudioFormatConversion(& - (dc-> - audioFormat), - dataInLen, - &(cb-> - audioFormat)); + datalen = pcm_sizeOfConvBuffer(&(dc->audioFormat), dataInLen, + &(cb->audioFormat)); if (datalen > convBufferLen) { convBuffer = xrealloc(convBuffer, datalen); convBufferLen = datalen; |