diff options
author | Warren Dukes <warren.dukes@gmail.com> | 2004-05-10 12:35:18 +0000 |
---|---|---|
committer | Warren Dukes <warren.dukes@gmail.com> | 2004-05-10 12:35:18 +0000 |
commit | 2ec1c5ff3c1ff67825fb449c9eab2c3e4ff441f6 (patch) | |
tree | 249f15fc84bd307facedee89452cdeb606580e5f /src/aac_decode.c | |
parent | cd3180c70180ae49c0c5611850c18ce0cebdd464 (diff) | |
download | mpd-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/aac_decode.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/aac_decode.c b/src/aac_decode.c index 24171adb7..7013502d4 100644 --- a/src/aac_decode.c +++ b/src/aac_decode.c @@ -251,7 +251,7 @@ int getAacTotalTime(char * file) { } -int aac_decode(OutputBuffer * cb, AudioFormat * af, DecoderControl * dc) { +int aac_decode(OutputBuffer * cb, DecoderControl * dc) { float time; float totalTime; faacDecHandle decoder; @@ -306,9 +306,9 @@ int aac_decode(OutputBuffer * cb, AudioFormat * af, DecoderControl * dc) { return -1; } - af->bits = 16; + dc->audioFormat.bits = 16; - cb->totalTime = totalTime; + dc->totalTime = totalTime; time = 0.0; @@ -342,8 +342,10 @@ int aac_decode(OutputBuffer * cb, AudioFormat * af, DecoderControl * dc) { #endif if(dc->start) { - af->channels = frameInfo.channels; - af->sampleRate = sampleRate; + dc->audioFormat.channels = frameInfo.channels; + dc->audioFormat.sampleRate = sampleRate; + getOutputAudioFormat(&(dc->audioFormat), + &(cb->audioFormat)); dc->state = DECODE_STATE_DECODE; dc->start = 0; } |