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 | 251 | // put the audio processing on a separate thread |
| 252 | 252 | QThread* audioThread = new QThread(this); |
| 253 | 253 | |
| 254 | − Audio::Pointer audioIO = DependencyManager::get<Audio>(); | |
| 254 | + Audio::SharedPointer audioIO = DependencyManager::get<Audio>(); | |
| 255 | 255 | audioIO->moveToThread(audioThread); |
| 256 | − connect(audioThread, &QThread::started, audioIO, &Audio::start); | |
| 256 | + connect(audioThread, &QThread::started, audioIO.data(), &Audio::start); | |
| 257 | 257 | |
| 258 | 258 | audioThread->start(); |
| 259 | 259 | |
| @@ -306,17 +306,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 46 unmodified lines | ||
| 306 | 306 | // once the event loop has started, check and signal for an access token |
| 307 | 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 | 311 | // use our MyAvatar position and quat for address manager path |
| 312 | 312 | addressManager->setPositionGetter(getPositionForPath); |
| 313 | 313 | addressManager->setOrientationGetter(getOrientationForPath); |
| 314 | 314 | |
| 315 | 315 | // handle domain change signals from AddressManager |
| 316 | − connect(addressManager, &AddressManager::possibleDomainChangeRequiredToHostname, | |
| 316 | + connect(addressManager.data(), &AddressManager::possibleDomainChangeRequiredToHostname, | |
| 317 | 317 | this, &Application::changeDomainHostname); |
| 318 | 318 | |
| 319 | − connect(addressManager, &AddressManager::possibleDomainChangeRequiredViaICEForID, | |
| 319 | + connect(addressManager.data(), &AddressManager::possibleDomainChangeRequiredViaICEForID, | |
| 320 | 320 | &domainHandler, &DomainHandler::setIceServerHostnameAndID); |
| 321 | 321 | |
| 322 | 322 | _settings = new QSettings(this); |
| @@ -425,7 +425,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 102 unmodified lines | ||
| 425 | 425 | _trayIcon->show(); |
| 426 | 426 | |
| 427 | 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 | 430 | #ifdef HAVE_RTMIDI |
| 431 | 431 | // setup the MIDIManager |
| @@ -468,10 +468,10 @@ Application::~Application() { · 36 unmodified lines | ||
| 468 | 468 | // kill any audio injectors that are still around |
| 469 | 469 | AudioScriptingInterface::getInstance().stopAllInjectors(); |
| 470 | 470 | |
| 471 | − Audio* audioIO = DependencyManager::get<Audio>(); | |
| 471 | + Audio::SharedPointer audioIO = DependencyManager::get<Audio>(); | |
| 472 | 472 | |
| 473 | 473 | // stop the audio process |
| 474 | − QMetaObject::invokeMethod(audioIO, "stop"); | |
| 474 | + QMetaObject::invokeMethod(audioIO.data(), "stop"); | |
| 475 | 475 | |
| 476 | 476 | // ask the audio thread to quit and wait until it is done |
| 477 | 477 | audioIO->thread()->quit(); |
| @@ -2424,7 +2424,7 @@ void Application::update(float deltaTime) { · 1946 unmodified lines | ||
| 2424 | 2424 | if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS) { |
| 2425 | 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 | 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 | 3608 | static void setShortcutsEnabled(QWidget* widget, bool enabled) { |
| @@ -3765,7 +3765,7 @@ void Application::nodeKilled(SharedNodePointer node) { · 156 unmodified lines | ||
| 3765 | 3765 | _entityEditSender.nodeKilled(node); |
| 3766 | 3766 | |
| 3767 | 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 | 3771 | if (node->getType() == NodeType::VoxelServer) { |