summaryrefslogtreecommitdiff
path: root/src/codecs/include/mad.hpp
diff options
context:
space:
mode:
authorjacqueline <me@jacqueline.id.au>2023-06-07 13:19:45 +1000
committerjacqueline <me@jacqueline.id.au>2023-06-07 13:19:45 +1000
commit1f903accd95361735c841c87fdc6494ad3331b40 (patch)
tree5b69bd0548c06a93852a576fa90a170fa303a15e /src/codecs/include/mad.hpp
parent2a568846bd8f1c9e23e86e7570557eed6f18cf9f (diff)
downloadtangara-fw-1f903accd95361735c841c87fdc6494ad3331b40.tar.gz
Flesh out audio state machine for playback
Also fix mono playback
Diffstat (limited to 'src/codecs/include/mad.hpp')
-rw-r--r--src/codecs/include/mad.hpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/codecs/include/mad.hpp b/src/codecs/include/mad.hpp
index 3b1f5757..ea16cdc8 100644
--- a/src/codecs/include/mad.hpp
+++ b/src/codecs/include/mad.hpp
@@ -8,6 +8,7 @@
#include <cstddef>
#include <cstdint>
+#include <optional>
#include <string>
#include <utility>
@@ -24,7 +25,7 @@ class MadMp3Decoder : public ICodec {
~MadMp3Decoder();
auto CanHandleType(StreamType type) -> bool override;
- auto GetOutputFormat() -> OutputFormat override;
+ auto GetOutputFormat() -> std::optional<OutputFormat> override;
auto ResetForNewStream() -> void override;
auto SetInput(cpp::span<const std::byte> input) -> void override;
auto GetInputPosition() -> std::size_t override;
@@ -37,9 +38,6 @@ class MadMp3Decoder : public ICodec {
mad_frame frame_;
mad_synth synth_;
- mad_header header_;
- bool has_decoded_header_;
-
int current_sample_;
};