summaryrefslogtreecommitdiff
path: root/src/audio/include/audio_decoder.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/include/audio_decoder.hpp')
-rw-r--r--src/audio/include/audio_decoder.hpp34
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