This is so generic code looking at the Parameter for gain, solo, and
rec-enable will get the correct value for toggled.
{
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:
break;
case RecEnableAutomation:
/* default 0.0 - 1.0 is fine */
+ toggled = true;
break;
case PluginAutomation:
case FadeInAutomation:
case MuteAutomation:
max = 1.0f;
normal = 0.0f;
+ toggled = true;
break;
case MidiCCAutomation:
case MidiPgmChangeAutomation:
return p;
}
- p.set_range(type, min, max, normal, false);
+ p.set_range(type, min, max, normal, toggled);
return p;
}