diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-11-23 17:15:06 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-11-23 17:15:06 +1100 |
| commit | a7df2855889055976956a58d2a36f23626371ee9 (patch) | |
| tree | 16e180e57f84474acaeb1893208cc07e278af6f4 /src/audio/include/audio_decoder.hpp | |
| parent | dfa9ab6e04689b99267092e016a91d9254f94cd8 (diff) | |
| download | tangara-fw-a7df2855889055976956a58d2a36f23626371ee9.tar.gz | |
Mostly done pipeline arch. Now onto cleanup and building.
Diffstat (limited to 'src/audio/include/audio_decoder.hpp')
| -rw-r--r-- | src/audio/include/audio_decoder.hpp | 21 |
1 files changed, 14 insertions, 7 deletions
diff --git a/src/audio/include/audio_decoder.hpp b/src/audio/include/audio_decoder.hpp index 2ee43fb7..98ebdc71 100644 --- a/src/audio/include/audio_decoder.hpp +++ b/src/audio/include/audio_decoder.hpp @@ -1,27 +1,34 @@ #pragma once #include <cstddef> -#include "audio_element.hpp" + #include "ff.h" + +#include "audio_element.hpp" #include "codec.hpp" namespace audio { +/* + * An audio element that accepts various kinds of encoded audio streams as + * input, and converts them to uncompressed PCM output. + */ class AudioDecoder : public IAudioElement { public: AudioDecoder(); ~AudioDecoder(); - auto SetInputBuffer(StreamBufferHandle_t) -> void; - auto SetOutputBuffer(StreamBufferHandle_t) -> void; + auto SetInputBuffer(StreamBufferHandle_t*) -> void; + auto SetOutputBuffer(StreamBufferHandle_t*) -> void; + + AudioDecoder(const AudioDecoder&) = delete; + AudioDecoder& operator=(const AudioDecoder&) = delete; private: std::unique_ptr<codecs::ICodec> current_codec_; + std::optional<StreamInfo> stream_info_; - uint8_t *working_buffer_; - - StreamBufferHandle_t input_buffer_; - StreamBufferHandle_t output_buffer_; + uint8_t* chunk_buffer_; }; } // namespace audio |
