aboutsummaryrefslogtreecommitdiffstats
path: root/src/AACDecoder.cpp
diff options
context:
space:
mode:
authorMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-21 11:50:28 +0100
committerMatthias P. Braendli <matthias.braendli@mpb.li>2018-02-21 11:50:28 +0100
commit3a5da13910ec0eccf439d8b3a9f6728d127dc1b8 (patch)
tree3442b428d7eb8bb21f057eb08b945a91950d25f4 /src/AACDecoder.cpp
parent60140af509d33cd2179c56388b16746e9d67071a (diff)
downloadODR-AudioEnc-3a5da13910ec0eccf439d8b3a9f6728d127dc1b8.tar.gz
ODR-AudioEnc-3a5da13910ec0eccf439d8b3a9f6728d127dc1b8.tar.bz2
ODR-AudioEnc-3a5da13910ec0eccf439d8b3a9f6728d127dc1b8.zip
Correct wav header write
Diffstat (limited to 'src/AACDecoder.cpp')
-rw-r--r--src/AACDecoder.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/AACDecoder.cpp b/src/AACDecoder.cpp
index 238a801..861bdaf 100644
--- a/src/AACDecoder.cpp
+++ b/src/AACDecoder.cpp
@@ -104,13 +104,13 @@ void AACDecoder::decode_frame(uint8_t *data, size_t len)
std::to_string(init_result));
}
- m_channels = aac_channel_mode || ps_flag ? 2 : 1;
+ m_channels = (aac_channel_mode or ps_flag) ? 2 : 1;
size_t output_frame_len = 960 * 2 * m_channels * (sbr_flag ? 2 : 1);
m_output_frame.resize(output_frame_len);
fprintf(stderr, " Setting decoder output frame len %zu\n", output_frame_len);
const int sample_rate = dac_rate ? 48000 : 32000;
- m_wav_writer.initialise_header(sample_rate);
+ m_wav_writer.initialise_header(sample_rate, m_channels);
m_decoder_set_up = true;
fprintf(stderr, " Set up decoder with %d Hz, %s%swith %d channels\n",