diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-04-01 13:22:21 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-04-19 10:29:38 +1000 |
| commit | 7c6fd654f50e6665efa4226c6b927f9762734182 (patch) | |
| tree | 58ccb69068c550e9c2223c1b510cfa525690b731 /src/codecs/mad.cpp | |
| parent | 3817ec0c77b8d44e54b35ea9f76e7bb4666c6c08 (diff) | |
| download | tangara-fw-7c6fd654f50e6665efa4226c6b927f9762734182.tar.gz | |
New pipeline building, still needs proper control
Diffstat (limited to 'src/codecs/mad.cpp')
| -rw-r--r-- | src/codecs/mad.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/codecs/mad.cpp b/src/codecs/mad.cpp index 1112bd62..eec2d633 100644 --- a/src/codecs/mad.cpp +++ b/src/codecs/mad.cpp @@ -5,6 +5,7 @@ #include "mad.h" #include "codec.hpp" +#include "types.hpp" namespace codecs { @@ -35,8 +36,8 @@ MadMp3Decoder::~MadMp3Decoder() { mad_header_finish(&header_); } -auto MadMp3Decoder::CanHandleFile(const std::string& path) -> bool { - return true; // TODO. +auto MadMp3Decoder::CanHandleType(StreamType type) -> bool { + return type == STREAM_MP3; } auto MadMp3Decoder::GetOutputFormat() -> OutputFormat { @@ -52,7 +53,7 @@ auto MadMp3Decoder::ResetForNewStream() -> void { has_decoded_header_ = false; } -auto MadMp3Decoder::SetInput(cpp::span<std::byte> input) -> void { +auto MadMp3Decoder::SetInput(cpp::span<const std::byte> input) -> void { mad_stream_buffer(&stream_, reinterpret_cast<const unsigned char*>(input.data()), input.size()); |
