From 7999bd2e087d5ee696899f1383c187b7e787069a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Nusser?= Date: Fri, 29 Jan 2016 15:03:58 +0100 Subject: wip --- src/audiocachefile.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/audiocachefile.h') diff --git a/src/audiocachefile.h b/src/audiocachefile.h index 9910563..8e40a2e 100644 --- a/src/audiocachefile.h +++ b/src/audiocachefile.h @@ -29,6 +29,7 @@ #include #include #include +#include #include #include "mutex.h" @@ -43,7 +44,7 @@ public: size_t channel; //< Channel number sample_t* samples; //< Sample buffer pointer. size_t num_samples; //< Number of samples in the sample buffer - volatile bool* ready; //< Is set to tru when the loading is done. + volatile bool* ready; //< Is set to true when the loading is done. }; using CacheChannels = std::list; @@ -56,7 +57,7 @@ class AudioCacheFile { friend class TestableAudioCacheFiles; public: //! Create file handle for filename. - AudioCacheFile(const std::string& filename); + AudioCacheFile(const std::string& filename, std::vector& read_buffer); //! Closes file handle. ~AudioCacheFile(); @@ -78,6 +79,7 @@ private: SNDFILE* fh{nullptr}; SF_INFO sf_info; std::string filename; + std::vector& read_buffer; }; class AudioCacheFiles { @@ -95,4 +97,5 @@ public: protected: std::map audiofiles; std::mutex mutex; + std::vector read_buffer; }; -- cgit v1.2.3