diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-06-15 10:33:46 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-06-15 10:33:46 +1000 |
| commit | a2c1dfbabddc2b4abaf8bf27c9ed9d1b99594859 (patch) | |
| tree | 47fa6b1a0d4d6f1160b8d60d04ee9f6d67e10ce4 /src/audio/include | |
| parent | 1238437717a49924cb45a12b934b3108c402e864 (diff) | |
| download | tangara-fw-a2c1dfbabddc2b4abaf8bf27c9ed9d1b99594859.tar.gz | |
Add vorbis and flac decoders, flesh out codec interface
vorbis doesn't quite work yet, not sure why. will pick it up again
later.
Diffstat (limited to 'src/audio/include')
| -rw-r--r-- | src/audio/include/audio_decoder.hpp | 1 | ||||
| -rw-r--r-- | src/audio/include/stream_info.hpp | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/audio/include/audio_decoder.hpp b/src/audio/include/audio_decoder.hpp index 3cda0305..4e7e127e 100644 --- a/src/audio/include/audio_decoder.hpp +++ b/src/audio/include/audio_decoder.hpp @@ -42,6 +42,7 @@ class AudioDecoder : public IAudioElement { std::unique_ptr<codecs::ICodec> current_codec_; std::optional<StreamInfo::Format> current_input_format_; std::optional<StreamInfo::Format> current_output_format_; + std::optional<std::size_t> seek_to_sample_; bool has_samples_to_send_; bool has_input_remaining_; diff --git a/src/audio/include/stream_info.hpp b/src/audio/include/stream_info.hpp index 91b2f085..54b87003 100644 --- a/src/audio/include/stream_info.hpp +++ b/src/audio/include/stream_info.hpp @@ -6,6 +6,7 @@ #pragma once +#include <stdint.h> #include <cstdint> #include <optional> #include <string> @@ -30,6 +31,9 @@ struct StreamInfo { // generated audio, etc.) std::optional<std::size_t> length_bytes{}; + // + std::optional<uint32_t> seek_to_seconds{}; + struct Encoded { // The codec that this stream is associated with. codecs::StreamType type; |
