summaryrefslogtreecommitdiff
path: root/src/audio/include/audio_backend.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/include/audio_backend.hpp')
-rw-r--r--src/audio/include/audio_backend.hpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/audio/include/audio_backend.hpp b/src/audio/include/audio_backend.hpp
new file mode 100644
index 00000000..85985cc2
--- /dev/null
+++ b/src/audio/include/audio_backend.hpp
@@ -0,0 +1,20 @@
+#pragma once
+
+#include <cstdint>
+namespace drivers {
+
+class IAudioBackend {
+ public:
+ virtual ~IAudioBackend() {}
+
+ enum SampleRate {};
+ enum BitDepth {};
+
+ virtual auto Configure(SampleRate sample_rate, BitDepth bit_depth)
+ -> bool = 0;
+ virtual auto WritePcmData(uint8_t* data, size_t length) -> bool = 0;
+
+ virtual auto SetVolume(uint8_t percent) -> void = 0;
+};
+
+} // namespace drivers