diff options
author | David Robillard <d@drobilla.net> | 2014-11-28 18:04:51 -0500 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2014-11-28 18:04:51 -0500 |
commit | 358ebde106dce1bc67ef86fabbd096e4e01b40cb (patch) | |
tree | e054864036a725e5176d3e74de359cb5337ac092 /libs/ardour/event_type_map.cc | |
parent | 4984d203f8141887761857dfedf66533d0018d1d (diff) |
Set the toggled default metadata of parameters.
This is so generic code looking at the Parameter for gain, solo, and
rec-enable will get the correct value for toggled.
Diffstat (limited to 'libs/ardour/event_type_map.cc')
-rw-r--r-- | libs/ardour/event_type_map.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/libs/ardour/event_type_map.cc b/libs/ardour/event_type_map.cc index ee6270356c..cc15d72356 100644 --- a/libs/ardour/event_type_map.cc +++ b/libs/ardour/event_type_map.cc @@ -154,9 +154,10 @@ EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const { Evoral::Parameter p(type, channel, id); - double min = 0.0f; - double max = 1.0f; - double normal = 0.0f; + double min = 0.0f; + double max = 1.0f; + double normal = 0.0f; + bool toggled = false; switch((AutomationType)type) { case NullAutomation: @@ -178,6 +179,7 @@ EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const break; case RecEnableAutomation: /* default 0.0 - 1.0 is fine */ + toggled = true; break; case PluginAutomation: case FadeInAutomation: @@ -190,6 +192,7 @@ EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const case MuteAutomation: max = 1.0f; normal = 0.0f; + toggled = true; break; case MidiCCAutomation: case MidiPgmChangeAutomation: @@ -203,7 +206,7 @@ EventTypeMap::new_parameter(uint32_t type, uint8_t channel, uint32_t id) const return p; } - p.set_range(type, min, max, normal, false); + p.set_range(type, min, max, normal, toggled); return p; } |