From e12ac1d9632856237388614bf393c7338500e00a Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 7 Jun 2023 15:39:28 +1000 Subject: Do some prep cleanup for multiple filetypes --- src/codecs/mad.cpp | 8 -------- 1 file changed, 8 deletions(-) (limited to 'src/codecs/mad.cpp') diff --git a/src/codecs/mad.cpp b/src/codecs/mad.cpp index 5044c22f..fbe85213 100644 --- a/src/codecs/mad.cpp +++ b/src/codecs/mad.cpp @@ -42,10 +42,6 @@ MadMp3Decoder::~MadMp3Decoder() { mad_synth_finish(&synth_); } -auto MadMp3Decoder::CanHandleType(StreamType type) -> bool { - return type == STREAM_MP3; -} - auto MadMp3Decoder::GetOutputFormat() -> std::optional { if (synth_.pcm.channels == 0 || synth_.pcm.samplerate == 0) { return {}; @@ -57,8 +53,6 @@ auto MadMp3Decoder::GetOutputFormat() -> std::optional { }); } -auto MadMp3Decoder::ResetForNewStream() -> void {} - auto MadMp3Decoder::SetInput(cpp::span input) -> void { mad_stream_buffer(&stream_, reinterpret_cast(input.data()), @@ -115,8 +109,6 @@ auto MadMp3Decoder::WriteOutputSamples(cpp::span output) } for (int channel = 0; channel < synth_.pcm.channels; channel++) { - // TODO(jacqueline): output 24 bit samples when (if?) we have a downmix - // step in the pipeline. uint32_t sample_24 = scaleToBits(synth_.pcm.samples[channel][current_sample_], 24); output[output_byte++] = static_cast((sample_24 >> 16) & 0xFF); -- cgit v1.2.3