mirror of
https://github.com/Ardour/ardour.git
synced 2026-01-03 12:19:33 +01:00
Clean up TMM at exit
This commit is contained in:
parent
f3fbb96d6a
commit
8bc3e86066
3 changed files with 12 additions and 1 deletions
|
|
@ -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.
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue