diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-17 21:47:20 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-06-17 21:47:20 +0000 |
commit | 01e006e46e6d4dd0ab25e08bd44d13dd1e195886 (patch) | |
tree | 3ed1b959caa20fd0e117de2fcfa557738ae5aa86 /libs/ardour/ardour/monitor_processor.h | |
parent | cb8bc87a542e35794a12e76a23594e63b3bad521 (diff) |
some changes to try to make the monitor section gain controls work as intended, and along the way start to rationalize MotionFeedback/VolumeController classes
git-svn-id: svn://localhost/ardour2/branches/3.0@9746 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/ardour/monitor_processor.h')
-rw-r--r-- | libs/ardour/ardour/monitor_processor.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libs/ardour/ardour/monitor_processor.h b/libs/ardour/ardour/monitor_processor.h index 023dacb619..5b724b5e8d 100644 --- a/libs/ardour/ardour/monitor_processor.h +++ b/libs/ardour/ardour/monitor_processor.h @@ -20,6 +20,7 @@ #ifndef __ardour_monitor_processor_h__ #define __ardour_monitor_processor_h__ +#include <algorithm> #include <iostream> #include <vector> @@ -52,7 +53,7 @@ public: void set_value (double v) { T newval = (T) v; if (newval != _value) { - _value = newval; + _value = std::max (_lower, std::min (_upper, newval)); Changed(); /* EMIT SIGNAL */ } } @@ -68,7 +69,7 @@ public: MPControl& operator=(const T& v) { if (v != _value) { - _value = v; + _value = std::max (_lower, std::min (_upper, v)); Changed (); /* EMIT SIGNAL */ } return *this; |