From bc661e52f925cdf5fe1effdbae2f81bd796eac32 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sun, 12 Mar 2017 14:28:21 +0100 Subject: Store new settings in plugin config. --- plugin/drumgizmo_plugin.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'plugin') diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 3db72c1..f31db98 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -497,6 +497,10 @@ std::string DrumGizmoPlugin::ConfigStringIO::get() bool2str(settings.enable_velocity_randomiser.load()) + "\n" " " + float2str(settings.velocity_randomiser_weight.load()) + "\n" + " " + + float2str(settings.disk_cache_upper_limit.load()) + "\n" + " " + + bool2str(settings.disk_cache_enable.load()) + "\n" ""; } @@ -541,6 +545,16 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) settings.enable_resampling.store(p.value("enable_resampling") == "true"); } + if(p.value("disk_cache_upper_limit") != "") + { + settings.disk_cache_upper_limit.store(str2float(p.value("disk_cache_upper_limit"))); + } + + if(p.value("disk_cache_enable") != "") + { + settings.disk_cache_enable.store(p.value("disk_cache_enable") == "true"); + } + std::string newkit = p.value("drumkitfile"); if(newkit != "") { -- cgit v1.2.3