From 9b1b401dcb986a26d10bcc898be670653acc2d3f Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 26 Jul 2023 17:11:23 +1000 Subject: big cleanup of new encoder + stream buffer types --- src/audio/include/fatfs_audio_input.hpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'src/audio/include/fatfs_audio_input.hpp') diff --git a/src/audio/include/fatfs_audio_input.hpp b/src/audio/include/fatfs_audio_input.hpp index a1b9689b..e13e49e2 100644 --- a/src/audio/include/fatfs_audio_input.hpp +++ b/src/audio/include/fatfs_audio_input.hpp @@ -89,9 +89,8 @@ class FatfsAudioInput : public IAudioSource { auto SetPath(const std::string&) -> void; auto SetPath() -> void; - auto Read(std::function, - std::function)>, - TickType_t) -> void override; + auto Read(std::function, TickType_t) + -> void override; FatfsAudioInput(const FatfsAudioInput&) = delete; FatfsAudioInput& operator=(const FatfsAudioInput&) = delete; @@ -118,11 +117,7 @@ class FatfsAudioInput : public IAudioSource { StreamBufferHandle_t streamer_buffer_; std::unique_ptr streamer_; - StreamInfo file_buffer_info_; - std::size_t file_buffer_len_; - std::byte* file_buffer_; - - RawStream file_buffer_stream_; + std::unique_ptr input_buffer_; // Mutex guarding the current file/stream associated with this source. Must be // held during readings, and before altering the current file. @@ -130,7 +125,7 @@ class FatfsAudioInput : public IAudioSource { std::unique_ptr>> pending_path_; - std::optional current_format_; + bool is_first_read_; }; } // namespace audio -- cgit v1.2.3