diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-06-07 15:39:28 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-06-07 15:39:28 +1000 |
| commit | e12ac1d9632856237388614bf393c7338500e00a (patch) | |
| tree | 9f353c516427225906eafa9704f312dd12174a46 /src/codecs/mad.cpp | |
| parent | 7e96482087632278c3d9e4a5db6bad25374ada8f (diff) | |
| download | tangara-fw-e12ac1d9632856237388614bf393c7338500e00a.tar.gz | |
Do some prep cleanup for multiple filetypes
Diffstat (limited to 'src/codecs/mad.cpp')
| -rw-r--r-- | src/codecs/mad.cpp | 8 |
1 files changed, 0 insertions, 8 deletions
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<OutputFormat> { if (synth_.pcm.channels == 0 || synth_.pcm.samplerate == 0) { return {}; @@ -57,8 +53,6 @@ auto MadMp3Decoder::GetOutputFormat() -> std::optional<OutputFormat> { }); } -auto MadMp3Decoder::ResetForNewStream() -> void {} - auto MadMp3Decoder::SetInput(cpp::span<const std::byte> input) -> void { mad_stream_buffer(&stream_, reinterpret_cast<const unsigned char*>(input.data()), @@ -115,8 +109,6 @@ auto MadMp3Decoder::WriteOutputSamples(cpp::span<std::byte> 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<std::byte>((sample_24 >> 16) & 0xFF); |
