13
0

Compatibility with old out-of-range automation-lane data

Ardour may have ignored log-scale for parameters 0..N and allowed
writing '0'. Force those values into the valid range on session load.
Also mark the list as "needs sorting" which removes potential duplicates.
This commit is contained in:
Robin Gareus 2017-07-04 20:12:51 +02:00
parent 135ffdcf6b
commit c4578db595
2 changed files with 5 additions and 0 deletions

View File

@ -444,6 +444,7 @@ AutomationList::deserialize_events (const XMLNode& node)
ok = false;
break;
}
y = std::min ((double)_desc.upper, std::max ((double)_desc.lower, y));
fast_simple_add (x, y);
}
@ -501,6 +502,7 @@ AutomationList::set_state (const XMLNode& node, int version)
continue;
}
y = std::min ((double)_desc.upper, std::max ((double)_desc.lower, y));
fast_simple_add (x, y);
}

View File

@ -412,6 +412,9 @@ ControlList::fast_simple_add (double when, double value)
_events.insert (_events.end(), new ControlEvent (when, value));
mark_dirty ();
if (_frozen) {
_sort_pending = true;
}
}
void