From 6a90e6c24f05c57cdbe19e5cc44c77c9e5810148 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Sat, 14 Oct 2017 17:50:01 +0200 Subject: Added plugin store/restore of latency filter settings, added the missing settings to the lv2 unittest and added the missing SettingsGetter and SettingsNotifier parts. --- plugin/drumgizmo_plugin.cc | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) (limited to 'plugin') diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index c8d8392..90db744 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -571,6 +571,16 @@ std::string DrumGizmoPlugin::ConfigStringIO::get() bool2str(settings.enable_bleed_control.load()) + "\n" " " + float2str(settings.master_bleed.load()) + "\n" + " " + + bool2str(settings.enable_latency_modifier.load()) + "\n" + " " + + int2str(settings.latency_max.load()) + "\n" + " " + + int2str(settings.latency_laid_back.load()) + "\n" + " " + + float2str(settings.latency_stddev.load()) + "\n" + " " + + float2str(settings.latency_regain.load()) + "\n" ""; } @@ -645,6 +655,31 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) settings.master_bleed.store(str2float(p.value("master_bleed"))); } + if(p.value("enable_latency_modifier") != "") + { + settings.enable_latency_modifier.store(p.value("enable_latency_modifier") == "true"); + } + + if(p.value("latency_max") != "") + { + settings.latency_max.store(str2int(p.value("latency_max"))); + } + + if(p.value("latency_laid_back") != "") + { + settings.latency_laid_back.store(str2int(p.value("latency_laid_back"))); + } + + if(p.value("latency_stddev") != "") + { + settings.latency_stddev.store(str2float(p.value("latency_stddev"))); + } + + if(p.value("latency_regain") != "") + { + settings.latency_regain.store(str2float(p.value("latency_regain"))); + } + std::string newkit = p.value("drumkitfile"); if(newkit != "") { -- cgit v1.2.3