summaryrefslogtreecommitdiff
path: root/libs/ardour
diff options
context:
space:
mode:
Diffstat (limited to 'libs/ardour')
-rw-r--r--libs/ardour/audioengine.cc12
-rw-r--r--libs/ardour/butler.cc1
-rw-r--r--libs/ardour/route.cc8
3 files changed, 15 insertions, 6 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc
index 322365fb9f..2035265c46 100644
--- a/libs/ardour/audioengine.cc
+++ b/libs/ardour/audioengine.cc
@@ -134,9 +134,7 @@ _thread_init_callback (void * /*arg*/)
knows about it.
*/
- char* c = new char[12];
- strcpy (c, X_("audioengine"));
- pthread_set_name (c);
+ pthread_set_name (X_("audioengine"));
PBD::notify_gui_about_thread_creation ("gui", pthread_self(), X_("Audioengine"), 4096);
PBD::notify_gui_about_thread_creation ("midiui", pthread_self(), X_("Audioengine"), 128);
@@ -209,8 +207,6 @@ AudioEngine::start ()
// error << _("cannot activate JACK client") << endmsg;
}
- start_metering_thread();
-
_raw_buffer_sizes[DataType::AUDIO] = blocksize * sizeof(float);
}
@@ -550,6 +546,8 @@ AudioEngine::start_metering_thread ()
void
AudioEngine::meter_thread ()
{
+ pthread_set_name (X_("meter"));
+
while (true) {
Glib::usleep (10000); /* 1/100th sec interval */
if (g_atomic_int_get(&m_meter_exit)) {
@@ -567,6 +565,8 @@ AudioEngine::set_session (Session *s)
SessionHandlePtr::set_session (s);
if (_session) {
+
+ start_metering_thread ();
nframes_t blocksize = jack_get_buffer_size (_jack);
@@ -602,6 +602,8 @@ AudioEngine::remove_session ()
if (_running) {
+ stop_metering_thread ();
+
if (_session) {
session_remove_pending = true;
session_removed.wait(_process_lock);
diff --git a/libs/ardour/butler.cc b/libs/ardour/butler.cc
index 25d8d6c148..addf6ddf27 100644
--- a/libs/ardour/butler.cc
+++ b/libs/ardour/butler.cc
@@ -115,6 +115,7 @@ void *
Butler::_thread_work (void* arg)
{
SessionEvent::create_per_thread_pool ("butler events", 64);
+ pthread_set_name (X_("butler"));
return ((Butler *) arg)->thread_work ();
}
diff --git a/libs/ardour/route.cc b/libs/ardour/route.cc
index 69b37fb7c3..29cc32bf24 100644
--- a/libs/ardour/route.cc
+++ b/libs/ardour/route.cc
@@ -165,8 +165,14 @@ Route::~Route ()
{
DEBUG_TRACE (DEBUG::Destruction, string_compose ("route %1 destructor\n", _name));
+ /* do this early so that we don't get incoming signals as we are going through destruction
+ */
+
+ drop_connections ();
+
/* don't use clear_processors here, as it depends on the session which may
- be half-destroyed by now */
+ be half-destroyed by now
+ */
Glib::RWLock::WriterLock lm (_processor_lock);
for (ProcessorList::iterator i = _processors.begin(); i != _processors.end(); ++i) {