diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-30 21:37:58 +0000 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2011-05-30 21:37:58 +0000 |
commit | de9e216cb5fcc08b6c39071d7cef031673aa67da (patch) | |
tree | 696922c23551b5609277be3dbbc4b1d378ad6fc2 /libs/ardour/session_transport.cc | |
parent | 14a80c091d850045bd35c56d5d378bfdd2fbe4f9 (diff) |
(1) push a locate all the way through the processing heirarchy so that MIDI output ports can resolve any notes currently playing (2) remove MidiStateTracker from MidiPort and use a fixed set of MIDI messages (sustain-off and all-notes-off, per channel) to do note resolution (3) move note resolution caused by a LoopEvent psuedo-event to within the main MidiPort::flush_output() loop, so that we resolve (turn off) Notes that come before the loop point, rather than send them out after the note resolution messages
git-svn-id: svn://localhost/ardour2/branches/3.0@9635 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r-- | libs/ardour/session_transport.cc | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc index a030d3afc2..48b84c492c 100644 --- a/libs/ardour/session_transport.cc +++ b/libs/ardour/session_transport.cc @@ -271,6 +271,15 @@ Session::realtime_stop (bool abort, bool clear_state) } void +Session::realtime_locate () +{ + boost::shared_ptr<RouteList> r = routes.reader (); + for (RouteList::iterator i = r->begin(); i != r->end(); ++i) { + (*i)->realtime_locate (); + } +} + +void Session::butler_transport_work () { restart: @@ -843,8 +852,20 @@ Session::locate (framepos_t target_frame, bool with_roll, bool with_flush, bool outbound_mtc_timecode_frame = _transport_frame; next_quarter_frame_to_send = 0; + /* do "stopped" stuff if: + * + * we are rolling AND + * no autoplay in effect AND + * we're not going to keep rolling after the locate AND + * !(playing a loop with JACK sync) + * + */ + if (transport_rolling() && (!auto_play_legal || !config.get_auto_play()) && !with_roll && !(synced_to_jack() && play_loop)) { realtime_stop (false, true); // XXX paul - check if the 2nd arg is really correct + } else { + /* otherwise tell the world that we located */ + realtime_locate (); } if (force || !with_loop || loop_changing) { |