mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 18:42:58 +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
|
// destroy the AudioClient so it and its thread have a chance to go down safely
|
||||||
DependencyManager::destroy<AudioClient>();
|
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.
|
// Destroy third party processes after scripts have finished using them.
|
||||||
#ifdef HAVE_DDE
|
#ifdef HAVE_DDE
|
||||||
|
|
|
@ -34,6 +34,12 @@ AudioInjectorManager::~AudioInjectorManager() {
|
||||||
_injectors.pop();
|
_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
|
// quit and wait on the manager thread, if we ever created it
|
||||||
if (_thread) {
|
if (_thread) {
|
||||||
_thread->quit();
|
_thread->quit();
|
||||||
|
|
Loading…
Reference in a new issue