diff options
Diffstat (limited to 'libs/ardour/transport_master.cc')
-rw-r--r-- | libs/ardour/transport_master.cc | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/libs/ardour/transport_master.cc b/libs/ardour/transport_master.cc index 2564f87c5d..8799d51486 100644 --- a/libs/ardour/transport_master.cc +++ b/libs/ardour/transport_master.cc @@ -19,7 +19,9 @@ #include <vector> +#include "pbd/boost_debug.h" #include "pbd/debug.h" +#include "pbd/i18n.h" #include "ardour/audioengine.h" #include "ardour/debug.h" @@ -30,7 +32,6 @@ #include "ardour/types_convert.h" #include "ardour/utils.h" -#include "pbd/i18n.h" namespace ARDOUR { namespace Properties { @@ -83,6 +84,9 @@ TransportMaster::TransportMaster (SyncSource t, std::string const & name) TransportMaster::~TransportMaster() { + DEBUG_TRACE (DEBUG::Destruction, string_compose ("destroying transport master \"%1\" along with port %2\n", name(), (_port ? _port->name() : std::string ("no port")))); + + unregister_port (); } bool @@ -431,6 +435,15 @@ TransportMaster::display_name (bool sh) const return S_("SyncSource|JACK"); } +void +TransportMaster::unregister_port () +{ + if (_port) { + AudioEngine::instance()->unregister_port (_port); + _port.reset (); + } +} + boost::shared_ptr<Port> TransportMasterViaMIDI::create_midi_port (std::string const & port_name) { |