diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-12-02 13:39:00 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-12-02 13:39:00 +1100 |
| commit | 222c810b07ffc635fc7908d121e97e4d65ccc5c8 (patch) | |
| tree | 91c7b5c72a11770ebf3695bf0c234597b2bc419d /src/codecs/include/mad.hpp | |
| parent | 71a4f5166f5491dc0982a18d62c63e28b3a52faa (diff) | |
| download | tangara-fw-222c810b07ffc635fc7908d121e97e4d65ccc5c8.tar.gz | |
fix build errors
Diffstat (limited to 'src/codecs/include/mad.hpp')
| -rw-r--r-- | src/codecs/include/mad.hpp | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp index 241ea6c3..aa24f3c9 100644 --- a/src/codecs/include/mad.hpp +++ b/src/codecs/include/mad.hpp @@ -1,5 +1,11 @@ #pragma once +#include <cstddef> +#include <cstdint> +#include <string> + +#include "mad.h" + #include "codec.hpp" namespace codecs { @@ -9,10 +15,14 @@ class MadMp3Decoder : public ICodec { MadMp3Decoder(); ~MadMp3Decoder(); - auto ProcessInput(Result* res, uint8_t* input, std::size_t input_len) -> void; - auto WriteOutputSamples(Result* res, - uint8_t* output, - std::size_t output_length) -> void; + auto CanHandleFile(const std::string& path) -> bool override; + auto GetOutputFormat() -> OutputFormat override; + auto ResetForNewStream() -> void override; + auto SetInput(uint8_t* buffer, std::size_t length) -> void override; + auto GetInputPosition() -> std::size_t override; + auto ProcessNextFrame() -> cpp::result<bool, ProcessingError> override; + auto WriteOutputSamples(uint8_t* output, std::size_t output_length) + -> std::pair<std::size_t, bool> override; private: mad_stream stream_; @@ -22,7 +32,7 @@ class MadMp3Decoder : public ICodec { mad_header header_; bool has_decoded_header_; - int current_sample_ = -1; + int current_sample_; }; } // namespace codecs |
