diff options
| author | jacqueline <me@jacqueline.id.au> | 2024-05-02 19:12:26 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2024-05-02 19:12:26 +1000 |
| commit | 1573a8c4cde1cd9528b422b2dcc598e37ffe94a7 (patch) | |
| tree | d162822b8fd7054f81bace0c7a65ab4d5e6f93ef /src/audio/include/fatfs_source.hpp | |
| parent | a231fd1c8afedbeb14b0bc77d76bad61db986059 (diff) | |
| download | tangara-fw-1573a8c4cde1cd9528b422b2dcc598e37ffe94a7.tar.gz | |
WIP merge cyclically dependent components into one big component
Diffstat (limited to 'src/audio/include/fatfs_source.hpp')
| -rw-r--r-- | src/audio/include/fatfs_source.hpp | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/src/audio/include/fatfs_source.hpp b/src/audio/include/fatfs_source.hpp deleted file mode 100644 index ce9b4db8..00000000 --- a/src/audio/include/fatfs_source.hpp +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright 2023 jacqueline <me@jacqueline.id.au> - * - * SPDX-License-Identifier: GPL-3.0-only - */ - -#pragma once - -#include <cstddef> -#include <cstdint> -#include <memory> - -#include "codec.hpp" -#include "ff.h" - -#include "audio_source.hpp" - -namespace audio { - -/* - * Handles coordination with a persistent background task to asynchronously - * read files from disk into a StreamBuffer. - */ -class FatfsSource : public codecs::IStream { - public: - FatfsSource(codecs::StreamType, std::unique_ptr<FIL> file); - ~FatfsSource(); - - auto Read(std::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; - - FatfsSource(const FatfsSource&) = delete; - FatfsSource& operator=(const FatfsSource&) = delete; - - private: - std::unique_ptr<FIL> file_; -}; - -} // namespace audio |
