diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-11-24 15:13:10 +1100 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-11-24 15:13:10 +1100 |
| commit | 7c6eb2997cbba350e7384151e13659271508e08f (patch) | |
| tree | b6f95a4843521e69b24cbf4c126d84442d19fc23 /src/audio/include/audio_decoder.hpp | |
| parent | 230721cd6271f3239b42e1d2471f8db15bebd712 (diff) | |
| download | tangara-fw-7c6eb2997cbba350e7384151e13659271508e08f.tar.gz | |
Migrate 'now playing' screen to lua
Diffstat (limited to 'src/audio/include/audio_decoder.hpp')
| -rw-r--r-- | src/audio/include/audio_decoder.hpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/audio/include/audio_decoder.hpp b/src/audio/include/audio_decoder.hpp index 1759f6e4..318e6fd4 100644 --- a/src/audio/include/audio_decoder.hpp +++ b/src/audio/include/audio_decoder.hpp @@ -10,6 +10,7 @@ #include <memory> #include "audio_converter.hpp" +#include "audio_events.hpp" #include "audio_sink.hpp" #include "audio_source.hpp" #include "codec.hpp" @@ -23,11 +24,13 @@ namespace audio { */ class Timer { public: - Timer(const codecs::ICodec::OutputFormat& format); + Timer(std::shared_ptr<Track>, const codecs::ICodec::OutputFormat& format); auto AddSamples(std::size_t) -> void; private: + std::shared_ptr<Track> track_; + uint32_t current_seconds_; uint32_t current_sample_in_second_; uint32_t samples_per_second_; @@ -54,7 +57,7 @@ class Decoder { Decoder(std::shared_ptr<IAudioSource> source, std::shared_ptr<SampleConverter> converter); - auto BeginDecoding(std::shared_ptr<codecs::IStream>) -> bool; + auto BeginDecoding(std::shared_ptr<TaggedStream>) -> bool; auto ContinueDecoding() -> bool; std::shared_ptr<IAudioSource> source_; |
