summaryrefslogtreecommitdiff
path: root/libs/surfaces/mackie/controls.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2011-05-04 09:22:32 +0000
committerCarl Hetherington <carl@carlh.net>2011-05-04 09:22:32 +0000
commit91d512174efb610b004bd4542e05f99080a668d5 (patch)
tree5c7f9ade1cebde038afac589fa67cc839c3cfe78 /libs/surfaces/mackie/controls.cc
parentf01dc1bfd5093a532a5f692549202951eaaf6818 (diff)
Use a timeout to reset faders' in_use flags when in BCF mode (ie with faders that don't support touch).
git-svn-id: svn://localhost/ardour2/branches/3.0@9469 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/surfaces/mackie/controls.cc')
-rw-r--r--libs/surfaces/mackie/controls.cc16
1 files changed, 11 insertions, 5 deletions
diff --git a/libs/surfaces/mackie/controls.cc b/libs/surfaces/mackie/controls.cc
index d73530f95b..ca7e086042 100644
--- a/libs/surfaces/mackie/controls.cc
+++ b/libs/surfaces/mackie/controls.cc
@@ -111,7 +111,6 @@ Control::Control( int id, int ordinal, std::string name, Group & group )
, _name( name )
, _group( group )
, _in_use( false )
-, _in_use_timeout( 250 )
{
}
@@ -178,15 +177,22 @@ Button & Strip::fader_touch()
return *_fader_touch;
}
-bool Control::in_use() const
+/** @return true if the control is in use, or false otherwise.
+ Buttons are `in use' when they are held down.
+ Faders with touch support are `in use' when they are being touched.
+ Pots, or faders without touch support, are `in use' from the first move
+ event until a timeout after the last move event.
+*/
+bool
+Control::in_use () const
{
return _in_use;
}
-Control & Control::in_use( bool rhs )
+void
+Control::set_in_use (bool in_use)
{
- _in_use = rhs;
- return *this;
+ _in_use = in_use;
}
ostream & Mackie::operator << ( ostream & os, const Mackie::Control & control )