summaryrefslogtreecommitdiff
path: root/src/codecs/mad.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/codecs/mad.cpp')
-rw-r--r--src/codecs/mad.cpp7
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());