diff options
author | André Nusser <andre.nusser@googlemail.com> | 2016-01-29 15:03:58 +0100 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-01-29 15:03:58 +0100 |
commit | 7999bd2e087d5ee696899f1383c187b7e787069a (patch) | |
tree | 4f2f40806a1baa8b17745bf972bf4a70da6880ff /src/audiocachefile.h | |
parent | 1137dade95adc73c494e748f56b2dc0ffd978ac2 (diff) |
wip <istoppedcounting>
Diffstat (limited to 'src/audiocachefile.h')
-rw-r--r-- | src/audiocachefile.h | 7 |
1 files changed, 5 insertions, 2 deletions
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 <string> #include <list> #include <map> +#include <vector> #include <mutex> #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<CacheChannel>; @@ -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<sample_t>& read_buffer); //! Closes file handle. ~AudioCacheFile(); @@ -78,6 +79,7 @@ private: SNDFILE* fh{nullptr}; SF_INFO sf_info; std::string filename; + std::vector<sample_t>& read_buffer; }; class AudioCacheFiles { @@ -95,4 +97,5 @@ public: protected: std::map<std::string, AudioCacheFile*> audiofiles; std::mutex mutex; + std::vector<sample_t> read_buffer; }; |