From ca5cf0102d2617f1a701e7a0a011ef4b02b14d0b Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 1 May 2017 19:34:07 +0200 Subject: Show buffer size in status area. --- src/drumgizmo.cc | 2 ++ src/settings.h | 5 +++++ 2 files changed, 7 insertions(+) (limited to 'src') diff --git a/src/drumgizmo.cc b/src/drumgizmo.cc index 592fa20..e55acf6 100644 --- a/src/drumgizmo.cc +++ b/src/drumgizmo.cc @@ -77,6 +77,8 @@ bool DrumGizmo::init() void DrumGizmo::setFrameSize(size_t framesize) { + settings.buffer_size.store(framesize); + // If we are resampling override the frame size. if(resamplers.isActive()) { diff --git a/src/settings.h b/src/settings.h index 61f92e7..76662c2 100644 --- a/src/settings.h +++ b/src/settings.h @@ -78,6 +78,7 @@ struct Settings Atomic velocity_randomiser_weight{0.1f}; Atomic samplerate{44100.0}; + Atomic buffer_size{1024}; // Only used to show in the UI. Atomic enable_resampling{true}; Atomic resampling_active{false}; @@ -114,6 +115,7 @@ struct SettingsGetter SettingRef velocity_randomiser_weight; SettingRef samplerate; + SettingRef buffer_size; SettingRef enable_resampling; SettingRef resampling_active; @@ -142,6 +144,7 @@ struct SettingsGetter , enable_velocity_randomiser{settings.enable_velocity_randomiser} , velocity_randomiser_weight{settings.velocity_randomiser_weight} , samplerate{settings.samplerate} + , buffer_size(settings.buffer_size) , enable_resampling{settings.enable_resampling} , resampling_active{settings.resampling_active} , number_of_files{settings.number_of_files} @@ -179,6 +182,7 @@ public: Notifier velocity_randomiser_weight; Notifier samplerate; + Notifier buffer_size; Notifier enable_resampling; Notifier resampling_active; @@ -215,6 +219,7 @@ public: EVAL(velocity_randomiser_weight); EVAL(samplerate); + EVAL(buffer_size); EVAL(enable_resampling); EVAL(resampling_active); -- cgit v1.2.3