diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2006-01-08 02:56:49 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2006-01-08 02:56:49 +0000 |
commit | a20f41ab39cc034740ccd564c1057d8737d763d5 (patch) | |
tree | 6f713470d72ec04ad03efb1ad6380717476c29fd /libs/ardour/session_midi.cc | |
parent | 1186b1d881fac3d1d1b55954b84b958c988501c4 (diff) |
a metric ton of changes
git-svn-id: svn://localhost/trunk/ardour2@246 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_midi.cc')
-rw-r--r-- | libs/ardour/session_midi.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/libs/ardour/session_midi.cc b/libs/ardour/session_midi.cc index 18d8b3672b..56e593086a 100644 --- a/libs/ardour/session_midi.cc +++ b/libs/ardour/session_midi.cc @@ -803,19 +803,14 @@ Session::mmc_record_enable (MIDI::MachineControl &mmc, size_t trk, bool enabled) { if (mmc_control) { - /* don't take route or diskstream lock: if using dynamic punch, - this could cause a dropout. XXX is that really OK? - or should we queue a rec-enable request? - */ - - size_t n; RouteList::iterator i; - - for (n = 0, i = routes.begin(); i != routes.end(); ++i) { + RWLockMonitor (route_lock, false, __LINE__, __FILE__); + + for (i = routes.begin(); i != routes.end(); ++i) { AudioTrack *at; if ((at = dynamic_cast<AudioTrack*>(*i)) != 0) { - if (n++ == trk) { + if (trk == at->remote_control_id()) { at->set_record_enable (enabled, &mmc); break; } @@ -1468,7 +1463,7 @@ Session::midi_thread_work () tmp = i; ++tmp; - if (!(*i)) { + if (!(*i)()) { midi_timeouts.erase (i); } |