diff options
Diffstat (limited to 'libs/ardour/audioengine.cc')
-rw-r--r-- | libs/ardour/audioengine.cc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/libs/ardour/audioengine.cc b/libs/ardour/audioengine.cc index 9c8407e8d7..07a70aebc9 100644 --- a/libs/ardour/audioengine.cc +++ b/libs/ardour/audioengine.cc @@ -63,6 +63,8 @@ using namespace PBD; AudioEngine* AudioEngine::_instance = 0; +static gint audioengine_thread_cnt = 1; + #ifdef SILENCE_AFTER #define SILENCE_AFTER_SECONDS 600 #endif @@ -1224,10 +1226,11 @@ AudioEngine::thread_init_callback (void* arg) pthread_set_name (X_("audioengine")); - SessionEvent::create_per_thread_pool (X_("AudioEngine"), 512); - - PBD::notify_event_loops_about_thread_creation (pthread_self(), X_("AudioEngine"), 4096); + const int thread_num = g_atomic_int_add (&audioengine_thread_cnt, 1); + const string thread_name = string_compose (X_("AudioEngine %1"), thread_num); + SessionEvent::create_per_thread_pool (thread_name, 512); + PBD::notify_event_loops_about_thread_creation (pthread_self(), thread_name, 4096); AsyncMIDIPort::set_process_thread (pthread_self()); if (arg) { |