mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
handle AudioInjectorManager cleanup in Application
This commit is contained in:
parent
ab5c8e072f
commit
935c0cc137
2 changed files with 10 additions and 0 deletions
|
@ -863,6 +863,10 @@ void Application::cleanupBeforeQuit() {
|
|||
|
||||
// destroy the AudioClient so it and its thread have a chance to go down safely
|
||||
DependencyManager::destroy<AudioClient>();
|
||||
|
||||
// destroy the AudioInjectorManager so it and its thread have a chance to go down safely
|
||||
// this will also stop any ongoing network injectors
|
||||
DependencyManager::destroy<AudioInjectorManager>();
|
||||
|
||||
// Destroy third party processes after scripts have finished using them.
|
||||
#ifdef HAVE_DDE
|
||||
|
|
|
@ -34,6 +34,12 @@ AudioInjectorManager::~AudioInjectorManager() {
|
|||
_injectors.pop();
|
||||
}
|
||||
|
||||
// get rid of the lock now that we've stopped all living injectors
|
||||
lock.unlock();
|
||||
|
||||
// in case the thread is waiting for injectors wake it up now
|
||||
_injectorReady.notify_one();
|
||||
|
||||
// quit and wait on the manager thread, if we ever created it
|
||||
if (_thread) {
|
||||
_thread->quit();
|
||||
|
|
Loading…
Reference in a new issue