summaryrefslogtreecommitdiff
path: root/libs/evoral
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
committerPaul Davis <paul@linuxaudiosystems.com>2011-01-27 01:31:03 +0000
commit15b5fce90480490455237da917167b0bcb5ce946 (patch)
tree5c1c5929a83c05db1a901e775fefe4f6cf8dc1b7 /libs/evoral
parent1385643131a2b2231bbbc0c584c76883fcfb580a (diff)
merge 3.0-panexp (pan experiments) branch, revisions 8534-8585 into 3.0, thus ending 3.0-panexp. THIS COMMIT WILL BREAK ALL EXISTING 3.0 SESSIONS IN SOME WAY (possibly not fatally).
git-svn-id: svn://localhost/ardour2/branches/3.0@8586 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/evoral')
-rw-r--r--libs/evoral/evoral/ControlList.hpp2
-rw-r--r--libs/evoral/src/ControlList.cpp4
2 files changed, 6 insertions, 0 deletions
diff --git a/libs/evoral/evoral/ControlList.hpp b/libs/evoral/evoral/ControlList.hpp
index 833fae4440..cfb7564ab6 100644
--- a/libs/evoral/evoral/ControlList.hpp
+++ b/libs/evoral/evoral/ControlList.hpp
@@ -115,6 +115,8 @@ public:
void slide (iterator before, double distance);
void shift (double before, double distance);
+ virtual bool clamp_value (double& when, double& value) const { return true; }
+
void rt_add (double when, double value);
void add (double when, double value);
void fast_simple_add (double when, double value);
diff --git a/libs/evoral/src/ControlList.cpp b/libs/evoral/src/ControlList.cpp
index cc8ba45001..6738e8c1ac 100644
--- a/libs/evoral/src/ControlList.cpp
+++ b/libs/evoral/src/ControlList.cpp
@@ -394,6 +394,10 @@ ControlList::add (double when, double value)
control surface (GUI, MIDI, OSC etc)
*/
+ if (!clamp_value (when, value)) {
+ return;
+ }
+
{
Glib::Mutex::Lock lm (_lock);
ControlEvent cp (when, 0.0f);