summaryrefslogtreecommitdiff
path: root/libs/ardour/session_transport.cc
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2013-09-05 13:22:34 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2013-09-05 13:22:34 -0400
commit1c49138e0099db37931b34fad552b43c332e187d (patch)
treeb3ebb558e8b055695fff674114272f7a28792bda /libs/ardour/session_transport.cc
parentfee626c386ccc23c41b7b2976c5031cd335b7587 (diff)
move MidiPortManager from AudioEngine to Session
This makes the responsibilities and ownership of non-Route related MIDI ports more clear, and removes a few wierd bits of code. It also ensures that open/close/open on the same session will retain connections for those MIDI ports
Diffstat (limited to 'libs/ardour/session_transport.cc')
-rw-r--r--libs/ardour/session_transport.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libs/ardour/session_transport.cc b/libs/ardour/session_transport.cc
index 1e492741b8..ab6d68fd67 100644
--- a/libs/ardour/session_transport.cc
+++ b/libs/ardour/session_transport.cc
@@ -618,7 +618,7 @@ Session::non_realtime_stop (bool abort, int on_entry, bool& finished)
_send_timecode_update = true;
if (!dynamic_cast<MTC_Slave*>(_slave)) {
- AudioEngine::instance()->mmc().send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdStop));
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdStop));
/* This (::non_realtime_stop()) gets called by main
process thread, which will lead to confusion
@@ -1271,7 +1271,7 @@ Session::start_transport ()
Timecode::Time time;
timecode_time_subframes (_transport_frame, time);
if (!dynamic_cast<MTC_Slave*>(_slave)) {
- AudioEngine::instance()->mmc().send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdDeferredPlay));
+ _mmc->send (MIDI::MachineControlCommand (MIDI::MachineControl::cmdDeferredPlay));
}
}
@@ -1392,7 +1392,7 @@ Session::switch_to_sync_source (SyncSource src)
}
try {
- new_slave = new MTC_Slave (*this, *AudioEngine::instance()->mtc_input_port());
+ new_slave = new MTC_Slave (*this, *_midi_ports->mtc_input_port());
}
catch (failed_constructor& err) {
@@ -1421,7 +1421,7 @@ Session::switch_to_sync_source (SyncSource src)
}
try {
- new_slave = new MIDIClock_Slave (*this, *AudioEngine::instance()->midi_clock_input_port(), 24);
+ new_slave = new MIDIClock_Slave (*this, *_midi_ports->midi_clock_input_port(), 24);
}
catch (failed_constructor& err) {
@@ -1648,7 +1648,7 @@ Session::send_mmc_locate (framepos_t t)
if (!_engine.freewheeling()) {
Timecode::Time time;
timecode_time_subframes (t, time);
- AudioEngine::instance()->mmc().send (MIDI::MachineControlCommand (time));
+ _mmc->send (MIDI::MachineControlCommand (time));
}
}