Showing the changes to interface/src/Application.cpp (1 of 72 files). Show all
Unified · Split
| @@ -50,6 +50,7 @@ · 49 unmodified lines | ||
| 50 | 50 | #include <AssetClient.h> |
| 51 | 51 | #include <AssetUpload.h> |
| 52 | 52 | #include <AutoUpdater.h> |
| 53 | +#include <AudioInjectorManager.h> | |
| 53 | 54 | #include <CursorManager.h> |
| 54 | 55 | #include <DeferredLightingEffect.h> |
| 55 | 56 | #include <display-plugins/DisplayPlugin.h> |
| @@ -343,6 +344,7 @@ bool setupEssentials(int& argc, char** argv) { · 287 unmodified lines | ||
| 343 | 344 | DependencyManager::set<PathUtils>(); |
| 344 | 345 | DependencyManager::set<InterfaceActionFactory>(); |
| 345 | 346 | DependencyManager::set<AssetClient>(); |
| 347 | + DependencyManager::set<AudioInjectorManager>(); | |
| 346 | 348 | DependencyManager::set<MessagesClient>(); |
| 347 | 349 | DependencyManager::set<UserInputMapper>(); |
| 348 | 350 | DependencyManager::set<controller::ScriptingInterface, ControllerScriptingInterface>(); |
| @@ -898,6 +900,10 @@ void Application::cleanupBeforeQuit() { · 549 unmodified lines | ||
| 898 | 900 | |
| 899 | 901 | // destroy the AudioClient so it and its thread have a chance to go down safely |
| 900 | 902 | DependencyManager::destroy<AudioClient>(); |
| 903 | + | |
| 904 | + // destroy the AudioInjectorManager so it and its thread have a chance to go down safely | |
| 905 | + // this will also stop any ongoing network injectors | |
| 906 | + DependencyManager::destroy<AudioInjectorManager>(); | |
| 901 | 907 | |
| 902 | 908 | // Destroy third party processes after scripts have finished using them. |
| 903 | 909 | #ifdef HAVE_DDE |
| @@ -2553,11 +2559,12 @@ void Application::init() { · 1649 unmodified lines | ||
| 2553 | 2559 | setAvatarUpdateThreading(); |
| 2554 | 2560 | } |
| 2555 | 2561 | |
| 2562 | +const bool ENABLE_AVATAR_UPDATE_THREADING = false; | |
| 2556 | 2563 | void Application::setAvatarUpdateThreading() { |
| 2557 | − setAvatarUpdateThreading(Menu::getInstance()->isOptionChecked(MenuOption::EnableAvatarUpdateThreading)); | |
| 2564 | + setAvatarUpdateThreading(ENABLE_AVATAR_UPDATE_THREADING); | |
| 2558 | 2565 | } |
| 2559 | 2566 | void Application::setRawAvatarUpdateThreading() { |
| 2560 | − setRawAvatarUpdateThreading(Menu::getInstance()->isOptionChecked(MenuOption::EnableAvatarUpdateThreading)); | |
| 2567 | + setRawAvatarUpdateThreading(ENABLE_AVATAR_UPDATE_THREADING); | |
| 2561 | 2568 | } |
| 2562 | 2569 | void Application::setRawAvatarUpdateThreading(bool isThreaded) { |
| 2563 | 2570 | if (_avatarUpdate) { |
| @@ -2575,17 +2582,11 @@ void Application::setAvatarUpdateThreading(bool isThreaded) { · 11 unmodified lines | ||
| 2575 | 2582 | } |
| 2576 | 2583 | |
| 2577 | 2584 | auto myAvatar = getMyAvatar(); |
| 2578 | − bool isRigEnabled = myAvatar->getEnableRigAnimations(); | |
| 2579 | − bool isGraphEnabled = myAvatar->getEnableAnimGraph(); | |
| 2580 | 2585 | if (_avatarUpdate) { |
| 2581 | 2586 | _avatarUpdate->terminate(); // Must be before we shutdown anim graph. |
| 2582 | 2587 | } |
| 2583 | − myAvatar->setEnableRigAnimations(false); | |
| 2584 | − myAvatar->setEnableAnimGraph(false); | |
| 2585 | 2588 | _avatarUpdate = new AvatarUpdate(); |
| 2586 | 2589 | _avatarUpdate->initialize(isThreaded); |
| 2587 | − myAvatar->setEnableRigAnimations(isRigEnabled); | |
| 2588 | − myAvatar->setEnableAnimGraph(isGraphEnabled); | |
| 2589 | 2590 | } |
| 2590 | 2591 | |
| 2591 | 2592 | void Application::updateLOD() { |
| @@ -2968,11 +2969,6 @@ void Application::update(float deltaTime) { · 376 unmodified lines | ||
| 2968 | 2969 | loadViewFrustum(_myCamera, _viewFrustum); |
| 2969 | 2970 | } |
| 2970 | 2971 | |
| 2971 | − // Update animation debug draw renderer | |
| 2972 | − { | |
| 2973 | − AnimDebugDraw::getInstance().update(); | |
| 2974 | − } | |
| 2975 | − | |
| 2976 | 2972 | quint64 now = usecTimestampNow(); |
| 2977 | 2973 | |
| 2978 | 2974 | // Update my voxel servers with my current voxel query... |
| @@ -3532,6 +3528,8 @@ void Application::displaySide(RenderArgs* renderArgs, Camera& theCamera, bool se · 553 unmodified lines | ||
| 3532 | 3528 | myAvatar->preRender(renderArgs); |
| 3533 | 3529 | myAvatar->endRender(); |
| 3534 | 3530 | |
| 3531 | + // Update animation debug draw renderer | |
| 3532 | + AnimDebugDraw::getInstance().update(); | |
| 3535 | 3533 | |
| 3536 | 3534 | activeRenderingThread = QThread::currentThread(); |
| 3537 | 3535 | PROFILE_RANGE(__FUNCTION__); |
| @@ -4363,10 +4361,6 @@ void Application::stopAllScripts(bool restart) { · 825 unmodified lines | ||
| 4363 | 4361 | it.value()->stop(); |
| 4364 | 4362 | qCDebug(interfaceapp) << "stopping script..." << it.key(); |
| 4365 | 4363 | } |
| 4366 | − // HACK: ATM scripts cannot set/get their animation priorities, so we clear priorities | |
| 4367 | − // whenever a script stops in case it happened to have been setting joint rotations. | |
| 4368 | − // TODO: expose animation priorities and provide a layered animation control system. | |
| 4369 | − getMyAvatar()->clearJointAnimationPriorities(); | |
| 4370 | 4364 | getMyAvatar()->clearScriptableSettings(); |
| 4371 | 4365 | } |
| 4372 | 4366 | |
| @@ -4382,10 +4376,6 @@ bool Application::stopScript(const QString& scriptHash, bool restart) { · 9 unmodified lines | ||
| 4382 | 4376 | scriptEngine->stop(); |
| 4383 | 4377 | stoppedScript = true; |
| 4384 | 4378 | qCDebug(interfaceapp) << "stopping script..." << scriptHash; |
| 4385 | − // HACK: ATM scripts cannot set/get their animation priorities, so we clear priorities | |
| 4386 | − // whenever a script stops in case it happened to have been setting joint rotations. | |
| 4387 | − // TODO: expose animation priorities and provide a layered animation control system. | |
| 4388 | − getMyAvatar()->clearJointAnimationPriorities(); | |
| 4389 | 4379 | } |
| 4390 | 4380 | if (_scriptEnginesHash.empty()) { |
| 4391 | 4381 | getMyAvatar()->clearScriptableSettings(); |