mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-09 00:04:56 +01:00
Fix incorrect initial point when recording toggled automation.
This commit is contained in:
parent
ffed94d89b
commit
ff2f934977
1 changed files with 9 additions and 2 deletions
|
|
@ -584,8 +584,15 @@ ControlList::add (double when, double value, bool with_guards, bool with_initial
|
||||||
/* empty: add an "anchor" point if the point we're adding past time 0 */
|
/* empty: add an "anchor" point if the point we're adding past time 0 */
|
||||||
|
|
||||||
if (when >= 1) {
|
if (when >= 1) {
|
||||||
_events.insert (_events.end(), new ControlEvent (0, value));
|
if (_desc.toggled) {
|
||||||
DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 added default value %2 at zero\n", this, _default_value));
|
const bool bval = ((value >= 0.5) ? true : false);
|
||||||
|
_events.insert (_events.end(), new ControlEvent (0, !bval));
|
||||||
|
DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 added bool value %2 at zero\n", this, !bval));
|
||||||
|
|
||||||
|
} else {
|
||||||
|
_events.insert (_events.end(), new ControlEvent (0, value));
|
||||||
|
DEBUG_TRACE (DEBUG::ControlList, string_compose ("@%1 added default value %2 at zero\n", this, _default_value));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue