diff options
author | Christian Glöckner <cgloeckner@freenet.de> | 2016-03-29 10:57:51 +0200 |
---|---|---|
committer | André Nusser <andre.nusser@googlemail.com> | 2016-03-31 17:35:47 +0200 |
commit | 13b5fabc8c3722e7e30b22d50f44e2a3bba3ef11 (patch) | |
tree | 2cbfdc69afff20588bca1e29e8dec83a59929b97 | |
parent | bdfa709298f0d64e6d9f1ca5e2de45bda9d9ebaa (diff) |
made API of AudioCacheFile more consistent
-rw-r--r-- | src/audiocachefile.cc | 5 | ||||
-rw-r--r-- | src/audiocachefile.h | 2 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/audiocachefile.cc b/src/audiocachefile.cc index 41e9859..2c2888c 100644 --- a/src/audiocachefile.cc +++ b/src/audiocachefile.cc @@ -36,7 +36,8 @@ AudioCacheFile::AudioCacheFile(const std::string& filename, std::vector<sample_t>& read_buffer) - : filename(filename), read_buffer(read_buffer) + : filename(filename) + , read_buffer(read_buffer) { std::memset(&sf_info, 0, sizeof(SF_INFO)); @@ -73,7 +74,7 @@ const std::string& AudioCacheFile::getFilename() const return filename; } -size_t AudioCacheFile::getChannelCount() +size_t AudioCacheFile::getChannelCount() const { return sf_info.channels; } diff --git a/src/audiocachefile.h b/src/audiocachefile.h index 88f1df2..01625a7 100644 --- a/src/audiocachefile.h +++ b/src/audiocachefile.h @@ -69,7 +69,7 @@ public: const std::string& getFilename() const; //! Get number of channels in the file - size_t getChannelCount(); + size_t getChannelCount() const; //! Read audio data from the file into the supplied channel caches. void readChunk(const CacheChannels& channels, size_t pos, size_t num_samples); |