diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-01 13:54:23 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2017-04-01 21:00:38 +0200 |
commit | a90e3d6958bb9923e288caf8b70ef6c06cc43ddf (patch) | |
tree | 87677e0a9544858c7a553aef5490e528a7e929ae /src/settings.h | |
parent | 1f41de14a04240dfd993b030306ac251d962a843 (diff) |
Added disk_cache_chunk_size and number_of_underruns to Settings.
Diffstat (limited to 'src/settings.h')
-rw-r--r-- | src/settings.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/settings.h b/src/settings.h index 8a646a1..3f9f9ae 100644 --- a/src/settings.h +++ b/src/settings.h @@ -52,8 +52,14 @@ struct Settings //! The maximum amount of memory in bytes that the AudioCache //! is allowed to use for preloading. Default is 1GB. Atomic<std::size_t> disk_cache_upper_limit{1024 * 1024 * 1024}; + + //! The optimal read chunk size from the disk. + Atomic<std::size_t> disk_cache_chunk_size{1024 * 1024}; + Atomic<bool> disk_cache_enable{true}; + Atomic<std::size_t> number_of_underruns{0}; + //! Increment this in order to invoke a reload of the current drumkit. Atomic<std::size_t> reload_counter{0}; @@ -83,7 +89,9 @@ struct SettingsGetter SettingRef<LoadStatus> drumkit_load_status; SettingRef<std::size_t> disk_cache_upper_limit; + SettingRef<std::size_t> disk_cache_chunk_size; SettingRef<bool> disk_cache_enable; + SettingRef<std::size_t> number_of_underruns; SettingRef<std::size_t> reload_counter; SettingRef<std::string> midimap_file; @@ -108,7 +116,9 @@ struct SettingsGetter : drumkit_file(settings.drumkit_file) , drumkit_load_status(settings.drumkit_load_status) , disk_cache_upper_limit(settings.disk_cache_upper_limit) + , disk_cache_chunk_size(settings.disk_cache_chunk_size) , disk_cache_enable(settings.disk_cache_enable) + , number_of_underruns(settings.number_of_underruns) , reload_counter(settings.reload_counter) , midimap_file(settings.midimap_file) , midimap_load_status(settings.midimap_load_status) @@ -134,7 +144,9 @@ public: Notifier<LoadStatus> drumkit_load_status; Notifier<std::size_t> disk_cache_upper_limit; + Notifier<std::size_t> disk_cache_chunk_size; Notifier<bool> disk_cache_enable; + Notifier<std::size_t> number_of_underruns; Notifier<std::size_t> reload_counter; Notifier<std::string> midimap_file; @@ -163,7 +175,9 @@ public: EVAL(drumkit_load_status); EVAL(disk_cache_upper_limit); + EVAL(disk_cache_chunk_size); EVAL(disk_cache_enable); + EVAL(number_of_underruns); EVAL(reload_counter); EVAL(midimap_file); |