aboutsummaryrefslogtreecommitdiffstats
path: root/src/mp3_decode.c
diff options
context:
space:
mode:
authorWarren Dukes <warren.dukes@gmail.com>2004-05-10 12:35:18 +0000
committerWarren Dukes <warren.dukes@gmail.com>2004-05-10 12:35:18 +0000
commit2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6 (patch)
tree249f15fc84bd307facedee89452cdeb606580e5f /src/mp3_decode.c
parentcd3180c70180ae49c0c5611850c18ce0cebdd464 (diff)
downloadmpd-2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6.tar.gz
mpd-2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6.tar.xz
mpd-2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6.zip
some more work on organizing code for resampling/audioFormat conversion
git-svn-id: https://svn.musicpd.org/mpd/trunk@968 09075e82-0dd4-0310-85a5-a0d7c8717e4f
Diffstat (limited to '')
-rw-r--r--src/mp3_decode.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/mp3_decode.c b/src/mp3_decode.c
index d3a6a592e..1b83f6eed 100644
--- a/src/mp3_decode.c
+++ b/src/mp3_decode.c
@@ -523,7 +523,7 @@ void initAudioFormatFromMp3DecodeData(mp3DecodeData * data, AudioFormat * af) {
af->channels = MAD_NCHANNELS(&(data->frame).header);
}
-int mp3_decode(OutputBuffer * cb, AudioFormat * af, DecoderControl * dc) {
+int mp3_decode(OutputBuffer * cb, DecoderControl * dc) {
mp3DecodeData data;
if(openMp3(dc->file,&data) < 0) {
@@ -531,8 +531,10 @@ int mp3_decode(OutputBuffer * cb, AudioFormat * af, DecoderControl * dc) {
return -1;
}
- initAudioFormatFromMp3DecodeData(&data,af);
- cb->totalTime = data.totalTime;
+ initAudioFormatFromMp3DecodeData(&data, &(dc->audioFormat));
+ getOutputAudioFormat(&(dc->audioFormat), &(cb->audioFormat));
+
+ dc->totalTime = data.totalTime;
dc->start = 0;
dc->state = DECODE_STATE_DECODE;