diff options
| author | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
|---|---|---|
| committer | ailurux <ailuruxx@gmail.com> | 2024-05-10 13:06:20 +1000 |
| commit | 3f177cdb8880abf199f4445f1398cd69fb813892 (patch) | |
| tree | e20de4949b1344c826e5af41ab701f3db75b21bc /src/audio/include/audio_source.hpp | |
| parent | 8019c7691889cde4c3d40bbd78d485a92d713bbf (diff) | |
| parent | e4ce7c4ac23402e09be8d6a52e0f739c0dff4ff0 (diff) | |
| download | tangara-fw-3f177cdb8880abf199f4445f1398cd69fb813892.tar.gz | |
Merge branch 'main' into file-browser
Diffstat (limited to 'src/audio/include/audio_source.hpp')
| -rw-r--r-- | src/audio/include/audio_source.hpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/src/audio/include/audio_source.hpp b/src/audio/include/audio_source.hpp deleted file mode 100644 index b38acd7a..00000000 --- a/src/audio/include/audio_source.hpp +++ /dev/null @@ -1,57 +0,0 @@ -/* - * Copyright 2023 jacqueline <me@jacqueline.id.au> - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include <memory> -#include "codec.hpp" -#include "track.hpp" -#include "types.hpp" - -namespace audio { - -class TaggedStream : public codecs::IStream { - public: - TaggedStream(std::shared_ptr<database::TrackTags>, - std::unique_ptr<codecs::IStream> wrapped, - std::string path, - uint32_t offset = 0 - ); - - auto tags() -> std::shared_ptr<database::TrackTags>; - - auto Read(cpp::span<std::byte> dest) -> ssize_t override; - - auto CanSeek() -> bool override; - - auto SeekTo(int64_t destination, SeekFrom from) -> void override; - - auto CurrentPosition() -> int64_t override; - - auto Size() -> std::optional<int64_t> override; - - auto Offset() -> uint32_t; - - auto Filepath() -> std::string; - - auto SetPreambleFinished() -> void override; - - private: - std::shared_ptr<database::TrackTags> tags_; - std::unique_ptr<codecs::IStream> wrapped_; - std::string filepath_; - int32_t offset_; -}; - -class IAudioSource { - public: - virtual ~IAudioSource() {} - - virtual auto HasNewStream() -> bool = 0; - virtual auto NextStream() -> std::shared_ptr<TaggedStream> = 0; -}; - -} // namespace audio |
