diff options
author | André Nusser <andre.nusser@googlemail.com> | 2020-05-02 13:02:29 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2020-05-02 13:02:29 +0200 |
commit | 32878759a55f8b80d808a3647a5802984438d8c0 (patch) | |
tree | bbcfef6a4af0d35f6ef6e6daf8699e722db624be | |
parent | 1671ee67a4d868811b3d3b5652b991d383a13679 (diff) |
Save powermap settings with session.
-rw-r--r-- | plugin/drumgizmo_plugin.cc | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/plugin/drumgizmo_plugin.cc b/plugin/drumgizmo_plugin.cc index 0e1021d..87ce160 100644 --- a/plugin/drumgizmo_plugin.cc +++ b/plugin/drumgizmo_plugin.cc @@ -633,6 +633,22 @@ std::string DrumGizmoPlugin::ConfigStringIO::get() float2str(settings.latency_stddev.load()) + "</value>\n" " <value name=\"latency_regain\">" + float2str(settings.latency_regain.load()) + "</value>\n" + " <value name=\"enable_powermap\">" + + bool2str(settings.enable_powermap.load()) + "</value>\n" + " <value name=\"powermap_fixed0_x\">" + + float2str(settings.powermap_fixed0_x.load()) + "</value>\n" + " <value name=\"powermap_fixed0_y\">" + + float2str(settings.powermap_fixed0_y.load()) + "</value>\n" + " <value name=\"powermap_fixed1_x\">" + + float2str(settings.powermap_fixed1_x.load()) + "</value>\n" + " <value name=\"powermap_fixed1_y\">" + + float2str(settings.powermap_fixed1_y.load()) + "</value>\n" + " <value name=\"powermap_fixed2_x\">" + + float2str(settings.powermap_fixed2_x.load()) + "</value>\n" + " <value name=\"powermap_fixed2_y\">" + + float2str(settings.powermap_fixed2_y.load()) + "</value>\n" + " <value name=\"powermap_shelf\">" + + bool2str(settings.powermap_shelf.load()) + "</value>\n" "</config>"; } @@ -748,6 +764,46 @@ bool DrumGizmoPlugin::ConfigStringIO::set(std::string config_string) settings.latency_regain.store(str2float(p.value("latency_regain"))); } + if(p.value("enable_powermap") != "") + { + settings.enable_powermap.store(p.value("enable_powermap") == "true"); + } + + if(p.value("powermap_fixed0_x") != "") + { + settings.powermap_fixed0_x.store(str2float(p.value("powermap_fixed0_x"))); + } + + if(p.value("powermap_fixed0_y") != "") + { + settings.powermap_fixed0_y.store(str2float(p.value("powermap_fixed0_y"))); + } + + if(p.value("powermap_fixed1_x") != "") + { + settings.powermap_fixed1_x.store(str2float(p.value("powermap_fixed1_x"))); + } + + if(p.value("powermap_fixed1_y") != "") + { + settings.powermap_fixed1_y.store(str2float(p.value("powermap_fixed1_y"))); + } + + if(p.value("powermap_fixed2_x") != "") + { + settings.powermap_fixed2_x.store(str2float(p.value("powermap_fixed2_x"))); + } + + if(p.value("powermap_fixed2_y") != "") + { + settings.powermap_fixed2_y.store(str2float(p.value("powermap_fixed2_y"))); + } + + if(p.value("powermap_shelf") != "") + { + settings.powermap_shelf.store(p.value("powermap_shelf") == "true"); + } + std::string newkit = p.value("drumkitfile"); if(newkit != "") { |