From bd229936ec2cb30fe3360f2d83ffc7197fd6fb97 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 17 Sep 2019 18:26:03 -0600 Subject: add finite state machine to control/manage transport state --- libs/ardour/midi_clock_slave.cc | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'libs/ardour/midi_clock_slave.cc') diff --git a/libs/ardour/midi_clock_slave.cc b/libs/ardour/midi_clock_slave.cc index 5a06187ef4..cf2c84c034 100644 --- a/libs/ardour/midi_clock_slave.cc +++ b/libs/ardour/midi_clock_slave.cc @@ -58,9 +58,6 @@ MIDIClock_TransportMaster::MIDIClock_TransportMaster (std::string const & name, , _running (false) , _bpm (0) { - if ((_port = create_midi_port (string_compose ("%1 in", name))) == 0) { - throw failed_constructor(); - } } MIDIClock_TransportMaster::~MIDIClock_TransportMaster() @@ -75,6 +72,14 @@ MIDIClock_TransportMaster::init () current.reset (); } +void +MIDIClock_TransportMaster::create_port () +{ + if ((_port = create_midi_port (string_compose ("%1 in", _name))) == 0) { + throw failed_constructor(); + } +} + void MIDIClock_TransportMaster::set_session (Session *session) { -- cgit v1.2.3