mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:44:01 +02:00
cleanup qml before audio
This commit is contained in:
parent
164955dc81
commit
5413d97089
1 changed files with 11 additions and 12 deletions
|
@ -1556,17 +1556,6 @@ void Application::cleanupBeforeQuit() {
|
|||
saveSettings();
|
||||
_window->saveGeometry();
|
||||
|
||||
// stop the AudioClient
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||
"stop", Qt::BlockingQueuedConnection);
|
||||
|
||||
// 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
|
||||
DependencyManager::destroy<DdeFaceTracker>();
|
||||
|
@ -1575,7 +1564,18 @@ void Application::cleanupBeforeQuit() {
|
|||
DependencyManager::destroy<EyeTracker>();
|
||||
#endif
|
||||
|
||||
// stop QML
|
||||
DependencyManager::destroy<OffscreenUi>();
|
||||
|
||||
// stop audio after QML, as the qtwebengine may use it, and may crash if it is already stopped
|
||||
|
||||
// stop the AudioClient, synchronously
|
||||
QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
|
||||
"stop", Qt::BlockingQueuedConnection);
|
||||
|
||||
// destroy Audio so it and its threads have a chance to go down safely
|
||||
DependencyManager::destroy<AudioClient>();
|
||||
DependencyManager::destroy<AudioInjectorManager>();
|
||||
}
|
||||
|
||||
Application::~Application() {
|
||||
|
@ -1596,7 +1596,6 @@ Application::~Application() {
|
|||
DependencyManager::get<AvatarManager>()->getObjectsToRemoveFromPhysics(motionStates);
|
||||
_physicsEngine->removeObjects(motionStates);
|
||||
|
||||
DependencyManager::destroy<OffscreenUi>();
|
||||
DependencyManager::destroy<AvatarManager>();
|
||||
DependencyManager::destroy<AnimationCache>();
|
||||
DependencyManager::destroy<FramebufferCache>();
|
||||
|
|
Loading…
Reference in a new issue