From 60169cdd91c46fb9c5cd22c2864e47b8e2dc413e Mon Sep 17 00:00:00 2001 From: jacqueline Date: Thu, 17 Nov 2022 13:30:16 +1100 Subject: WIP on our own pipeline --- src/audio/include/audio_decoder.hpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/audio/include/audio_decoder.hpp (limited to 'src/audio/include/audio_decoder.hpp') 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 +#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 -- cgit v1.2.3