diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-02-15 16:12:07 +1100 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-02-15 16:12:07 +1100 |
| commit | 62f6179abe24339c2e5b7350528afbcad4c52067 (patch) | |
| tree | d14f0b35ef601d0877ced507c5560236da666218 /src/audio/audio_source.cpp | |
| parent | e466522c25758670da335195d60a5d599ed56177 (diff) | |
| download | tangara-fw-62f6179abe24339c2e5b7350528afbcad4c52067.tar.gz | |
Added offset for track seeking, wav impl. only rn
Diffstat (limited to 'src/audio/audio_source.cpp')
| -rw-r--r-- | src/audio/audio_source.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/audio/audio_source.cpp b/src/audio/audio_source.cpp index 44de1d1b..2543db44 100644 --- a/src/audio/audio_source.cpp +++ b/src/audio/audio_source.cpp @@ -11,8 +11,9 @@ namespace audio { TaggedStream::TaggedStream(std::shared_ptr<database::TrackTags> t, - std::unique_ptr<codecs::IStream> w) - : codecs::IStream(w->type()), tags_(t), wrapped_(std::move(w)) {} + std::unique_ptr<codecs::IStream> w, + uint32_t offset) + : codecs::IStream(w->type()), tags_(t), wrapped_(std::move(w)), offset_(offset) {} auto TaggedStream::tags() -> std::shared_ptr<database::TrackTags> { return tags_; @@ -38,6 +39,10 @@ auto TaggedStream::Size() -> std::optional<int64_t> { return wrapped_->Size(); } +auto TaggedStream::Offset() -> uint32_t { + return offset_; +} + auto TaggedStream::SetPreambleFinished() -> void { wrapped_->SetPreambleFinished(); } |
