Clean up TMM at exit
This commit is contained in:
@@ -41,6 +41,7 @@ class LIBARDOUR_API TransportMasterManager : public boost::noncopyable
|
||||
void engine_stopped ();
|
||||
|
||||
static TransportMasterManager& instance();
|
||||
static void destroy();
|
||||
/* this method is not thread-safe and is intended to be used only
|
||||
* very early in application-lifetime to check if the TMM has
|
||||
* been created yet. Do not use in other code.
|
||||
|
||||
@@ -654,6 +654,7 @@ ARDOUR::cleanup ()
|
||||
|
||||
delete &ControlProtocolManager::instance ();
|
||||
ARDOUR::AudioEngine::destroy ();
|
||||
ARDOUR::TransportMasterManager::destroy ();
|
||||
|
||||
delete Library;
|
||||
#ifdef HAVE_LRDF
|
||||
|
||||
@@ -47,7 +47,9 @@ TransportMasterManager::TransportMasterManager()
|
||||
|
||||
TransportMasterManager::~TransportMasterManager ()
|
||||
{
|
||||
clear ();
|
||||
Glib::Threads::RWLock::WriterLock lm (lock);
|
||||
_current_master.reset ();
|
||||
_transport_masters.clear ();
|
||||
}
|
||||
|
||||
TransportMasterManager&
|
||||
@@ -139,6 +141,13 @@ TransportMasterManager::instance()
|
||||
return *_instance;
|
||||
}
|
||||
|
||||
void
|
||||
TransportMasterManager::destroy()
|
||||
{
|
||||
delete _instance;
|
||||
_instance = 0;
|
||||
}
|
||||
|
||||
// Called from AudioEngine::process_callback() BEFORE Session::process() is called. Each transport master has processed any incoming data for this cycle,
|
||||
// and this method computes the transport speed that Ardour should use to get into and remain in sync with the master.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user