Showing the changes to interface/src/Application.cpp (1 of 13 files). Show all
Unified · Split
| @@ -251,9 +251,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 250 unmodified lines | |||
| 251 | // put the audio processing on a separate thread | 251 | // put the audio processing on a separate thread |
| 252 | QThread* audioThread = new QThread(this); | 252 | QThread* audioThread = new QThread(this); |
| 253 | 253 | ||
| 254 | Audio::Pointer audioIO = DependencyManager::get<Audio>(); | 254 | Audio::SharedPointer audioIO = DependencyManager::get<Audio>(); |
| 255 | audioIO->moveToThread(audioThread); | 255 | audioIO->moveToThread(audioThread); |
| 256 | connect(audioThread, &QThread::started, audioIO, &Audio::start); | 256 | connect(audioThread, &QThread::started, audioIO.data(), &Audio::start); |
| 257 | 257 | ||
| 258 | audioThread->start(); | 258 | audioThread->start(); |
| 259 | 259 | ||
| @@ -306,17 +306,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 46 unmodified lines | |||
| 306 | // once the event loop has started, check and signal for an access token | 306 | // once the event loop has started, check and signal for an access token |
| 307 | QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection); | 307 | QMetaObject::invokeMethod(&accountManager, "checkAndSignalForAccessToken", Qt::QueuedConnection); |
| 308 | 308 | ||
| 309 | AddressManager* addressManager = DependencyManager::get<AddressManager>(); | 309 | AddressManager::SharedPointer addressManager = DependencyManager::get<AddressManager>(); |
| 310 | 310 | ||
| 311 | // use our MyAvatar position and quat for address manager path | 311 | // use our MyAvatar position and quat for address manager path |
| 312 | addressManager->setPositionGetter(getPositionForPath); | 312 | addressManager->setPositionGetter(getPositionForPath); |
| 313 | addressManager->setOrientationGetter(getOrientationForPath); | 313 | addressManager->setOrientationGetter(getOrientationForPath); |
| 314 | 314 | ||
| 315 | // handle domain change signals from AddressManager | 315 | // handle domain change signals from AddressManager |
| 316 | connect(addressManager, &AddressManager::possibleDomainChangeRequiredToHostname, | 316 | connect(addressManager.data(), &AddressManager::possibleDomainChangeRequiredToHostname, |
| 317 | this, &Application::changeDomainHostname); | 317 | this, &Application::changeDomainHostname); |
| 318 | 318 | ||
| 319 | connect(addressManager, &AddressManager::possibleDomainChangeRequiredViaICEForID, | 319 | connect(addressManager.data(), &AddressManager::possibleDomainChangeRequiredViaICEForID, |
| 320 | &domainHandler, &DomainHandler::setIceServerHostnameAndID); | 320 | &domainHandler, &DomainHandler::setIceServerHostnameAndID); |
| 321 | 321 | ||
| 322 | _settings = new QSettings(this); | 322 | _settings = new QSettings(this); |
| @@ -425,7 +425,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 102 unmodified lines | |||
| 425 | _trayIcon->show(); | 425 | _trayIcon->show(); |
| 426 | 426 | ||
| 427 | // set the local loopback interface for local sounds from audio scripts | 427 | // set the local loopback interface for local sounds from audio scripts |
| 428 | AudioScriptingInterface::getInstance().setLocalAudioInterface(audioIO); | 428 | AudioScriptingInterface::getInstance().setLocalAudioInterface(audioIO.data()); |
| 429 | 429 | ||
| 430 | #ifdef HAVE_RTMIDI | 430 | #ifdef HAVE_RTMIDI |
| 431 | // setup the MIDIManager | 431 | // setup the MIDIManager |
| @@ -468,10 +468,10 @@ Application::~Application() { · 36 unmodified lines | |||
| 468 | // kill any audio injectors that are still around | 468 | // kill any audio injectors that are still around |
| 469 | AudioScriptingInterface::getInstance().stopAllInjectors(); | 469 | AudioScriptingInterface::getInstance().stopAllInjectors(); |
| 470 | 470 | ||
| 471 | Audio* audioIO = DependencyManager::get<Audio>(); | 471 | Audio::SharedPointer audioIO = DependencyManager::get<Audio>(); |
| 472 | 472 | ||
| 473 | // stop the audio process | 473 | // stop the audio process |
| 474 | QMetaObject::invokeMethod(audioIO, "stop"); | 474 | QMetaObject::invokeMethod(audioIO.data(), "stop"); |
| 475 | 475 | ||
| 476 | // ask the audio thread to quit and wait until it is done | 476 | // ask the audio thread to quit and wait until it is done |
| 477 | audioIO->thread()->quit(); | 477 | audioIO->thread()->quit(); |
| @@ -2424,7 +2424,7 @@ void Application::update(float deltaTime) { · 1946 unmodified lines | |||
| 2424 | if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS) { | 2424 | if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS) { |
| 2425 | _lastSendDownstreamAudioStats = now; | 2425 | _lastSendDownstreamAudioStats = now; |
| 2426 | 2426 | ||
| 2427 | QMetaObject::invokeMethod(DependencyManager::get<Audio>(), "sendDownstreamAudioStatsPacket", Qt::QueuedConnection); | 2427 | QMetaObject::invokeMethod(DependencyManager::get<Audio>().data(), "sendDownstreamAudioStatsPacket", Qt::QueuedConnection); |
| 2428 | } | 2428 | } |
| 2429 | } | 2429 | } |
| 2430 | } | 2430 | } |
| @@ -3602,7 +3602,7 @@ void Application::resetSensors() { · 1171 unmodified lines | |||
| 3602 | 3602 | ||
| 3603 | _myAvatar->reset(); | 3603 | _myAvatar->reset(); |
| 3604 | 3604 | ||
| 3605 | QMetaObject::invokeMethod(DependencyManager::get<Audio>(), "reset", Qt::QueuedConnection); | 3605 | QMetaObject::invokeMethod(DependencyManager::get<Audio>().data(), "reset", Qt::QueuedConnection); |
| 3606 | } | 3606 | } |
| 3607 | 3607 | ||
| 3608 | static void setShortcutsEnabled(QWidget* widget, bool enabled) { | 3608 | static void setShortcutsEnabled(QWidget* widget, bool enabled) { |
| @@ -3765,7 +3765,7 @@ void Application::nodeKilled(SharedNodePointer node) { · 156 unmodified lines | |||
| 3765 | _entityEditSender.nodeKilled(node); | 3765 | _entityEditSender.nodeKilled(node); |
| 3766 | 3766 | ||
| 3767 | if (node->getType() == NodeType::AudioMixer) { | 3767 | if (node->getType() == NodeType::AudioMixer) { |
| 3768 | QMetaObject::invokeMethod(DependencyManager::get<Audio>(), "audioMixerKilled"); | 3768 | QMetaObject::invokeMethod(DependencyManager::get<Audio>().data(), "audioMixerKilled"); |
| 3769 | } | 3769 | } |
| 3770 | 3770 | ||
| 3771 | if (node->getType() == NodeType::VoxelServer) { | 3771 | if (node->getType() == NodeType::VoxelServer) { |