diff options
| author | jacqueline <me@jacqueline.id.au> | 2022-11-17 13:30:16 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2022-11-17 13:30:16 +1100 |
| commit | 60169cdd91c46fb9c5cd22c2864e47b8e2dc413e (patch) | |
| tree | fd8d11915c9bcbc9b89cad27921de5f7fada0d78 /src/audio/include/audio_decoder.hpp | |
| parent | 1d340db87193ca589c3bd5df241ae0ed51a3100d (diff) | |
| download | tangara-fw-60169cdd91c46fb9c5cd22c2864e47b8e2dc413e.tar.gz | |
WIP on our own pipeline
Diffstat (limited to 'src/audio/include/audio_decoder.hpp')
| -rw-r--r-- | src/audio/include/audio_decoder.hpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/audio/include/audio_decoder.hpp b/src/audio/include/audio_decoder.hpp new file mode 100644 index 00000000..f460f9e9 --- /dev/null +++ b/src/audio/include/audio_decoder.hpp @@ -0,0 +1,34 @@ +#pragma once + +#include <cstddef> +#include "ff.h" + +namespace audio { + +enum SampleRate {}; +enum BitDepth {}; + +struct PcmStreamHeader { + SampleRate sample_rate; + BitDepth bit_depth; + bool configure_now; +}; + +class AudioDecoder { + public: + AudioDecoder(); + ~AudioDecoder(); + + auto SetSource(RingbufHandle_t& source) -> void; + + enum Status {}; + auto ProcessChunk() -> Status; + + auto GetOutputStream() const -> RingbufHandle_t; + + private: + RingbufHandle_t input_; + RingbufHandle_t output_; +}; + +} // namespace audio |
