aboutsummaryrefslogtreecommitdiffstats
path: root/src/audioOutput.c
diff options
context:
space:
mode:
authorJ. Alexander Treuman <jat@spatialrift.net>2007-05-22 23:11:36 +0000
committerJ. Alexander Treuman <jat@spatialrift.net>2007-05-22 23:11:36 +0000
commit407497c40a34ae299cca56de1bd7c92e5724c54a (patch)
treedeadb344cb967157fd97e3a80dac525bb3f651d8 /src/audioOutput.c
parente6d7663b10242d1cb9ad0411dbb45502db154b76 (diff)
downloadmpd-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 'src/audioOutput.c')
-rw-r--r--src/audioOutput.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/audioOutput.c b/src/audioOutput.c
index dd1635331..7a99dfd68 100644
--- a/src/audioOutput.c
+++ b/src/audioOutput.c
@@ -194,11 +194,9 @@ int openAudioOutput(AudioOutput * audioOutput, AudioFormat * audioFormat)
static void convertAudioFormat(AudioOutput * audioOutput, char **chunkArgPtr,
int *sizeArgPtr)
{
- int size =
- pcm_sizeOfOutputBufferForAudioFormatConversion(
- &(audioOutput->inAudioFormat),
- *sizeArgPtr,
- &(audioOutput->outAudioFormat));
+ int size = pcm_sizeOfConvBuffer(&(audioOutput->inAudioFormat),
+ *sizeArgPtr,
+ &(audioOutput->outAudioFormat));
if (size > audioOutput->convBufferLen) {
audioOutput->convBuffer =