History

standardize Audio bg thread joins

Zach Pomerantz committed 9 years ago

Commit cd2665f1 parent aea8b023 files · +68 −68Browse files

Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all

Unified · Split

interface/src/Application.cpp+4−7
@@ -1683,7 +1683,6 @@ void Application::updateHeartbeat() const { · 1682 unmodified lines
16831683
16841684 void Application::aboutToQuit() {
16851685 emit beforeAboutToQuit();
1686− DependencyManager::get<AudioClient>()->beforeAboutToQuit();
16871686
16881687 foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) {
16891688 if (inputPlugin->isActive()) {
@@ -1784,14 +1783,12 @@ void Application::cleanupBeforeQuit() { · 94 unmodified lines
17841783 _snapshotSoundInjector->stop();
17851784 }
17861785
1787− // stop audio after QML, as there are unexplained audio crashes originating in qtwebengine
1788−
1789− // stop the AudioClient, synchronously
1790− QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(),
1791− "stop", Qt::BlockingQueuedConnection);
1792−
1786+ // FIXME: something else is holding a reference to AudioClient,
1787+ // so it must be explicitly synchronously stopped here
1788+ QMetaObject::invokeMethod(DependencyManager::get<AudioClient>().data(), "stop", Qt::BlockingQueuedConnection);
17931789
17941790 // destroy Audio so it and its threads have a chance to go down safely
1791+ // this must happen after QML, as there are unexplained audio crashes originating in qtwebengine
17951792 DependencyManager::destroy<AudioClient>();
17961793 DependencyManager::destroy<AudioInjectorManager>();
17971794