diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-14 20:39:32 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-15 08:57:35 +0200 |
commit | 8b3506186e5c9c810bcbe4a4206874d9fd4dfe9b (patch) | |
tree | f27d5d1bcdd1f560de35f418bdf9333d32fff387 /src/audiocache.h | |
parent | 87e0b9b288c0157544cfcefb63015a319507698a (diff) |
Add chunk size control to the audio cache engine.
Diffstat (limited to 'src/audiocache.h')
-rw-r--r-- | src/audiocache.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/audiocache.h b/src/audiocache.h index 475f1aa..54abcf7 100644 --- a/src/audiocache.h +++ b/src/audiocache.h @@ -38,9 +38,8 @@ #include "audiocacheeventhandler.h" #include "settings.h" -#define CHUNK_MULTIPLIER 16 - -class AudioCache { +class AudioCache +{ public: AudioCache(Settings& settings); @@ -92,6 +91,10 @@ public: void setFrameSize(std::size_t framesize); std::size_t getFrameSize() const; + //! Signal the AudioCache sub-system to set it's internals according to the + //! chunk size parameter from Settings. + void updateChunkSize(std::size_t output_channels); + //! Control/get reader threaded mode. //! True means reading happening threaded, false means all reading done //! synchronious. @@ -102,6 +105,7 @@ private: std::size_t framesize{0}; sample_t* nodata{nullptr}; std::size_t nodata_framesize{0}; + std::size_t chunk_size{0}; AudioCacheIDManager id_manager; AudioCacheEventHandler event_handler{id_manager}; |