From c4578db595771b5db9572b23cfe3f9a7ebef66c3 Mon Sep 17 00:00:00 2001 From: Robin Gareus Date: Tue, 4 Jul 2017 20:12:51 +0200 Subject: 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. --- libs/ardour/automation_list.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libs/ardour/automation_list.cc') diff --git a/libs/ardour/automation_list.cc b/libs/ardour/automation_list.cc index 014b4c511b..8ceab4f3ea 100644 --- a/libs/ardour/automation_list.cc +++ b/libs/ardour/automation_list.cc @@ -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); } -- cgit v1.2.3