Showing the changes to interface/src/Application.cpp (1 of 3 files). Show all
Unified · Split
| @@ -1683,7 +1683,6 @@ void Application::updateHeartbeat() const { · 1682 unmodified lines | ||
| 1683 | 1683 | |
| 1684 | 1684 | void Application::aboutToQuit() { |
| 1685 | 1685 | emit beforeAboutToQuit(); |
| 1686 | − DependencyManager::get<AudioClient>()->beforeAboutToQuit(); | |
| 1687 | 1686 | |
| 1688 | 1687 | foreach(auto inputPlugin, PluginManager::getInstance()->getInputPlugins()) { |
| 1689 | 1688 | if (inputPlugin->isActive()) { |
| @@ -1784,14 +1783,12 @@ void Application::cleanupBeforeQuit() { · 94 unmodified lines | ||
| 1784 | 1783 | _snapshotSoundInjector->stop(); |
| 1785 | 1784 | } |
| 1786 | 1785 | |
| 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); | |
| 1793 | 1789 | |
| 1794 | 1790 | // 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 | |
| 1795 | 1792 | DependencyManager::destroy<AudioClient>(); |
| 1796 | 1793 | DependencyManager::destroy<AudioInjectorManager>(); |
| 1797 | 1794 | |