Showing the changes to interface/src/Application.cpp (1 of 93 files). Show all
Unified · Split
| @@ -456,6 +456,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 455 unmodified lines | |||
| 456 | audioIO->setOrientationGetter([this]{ return getMyAvatar()->getOrientationForAudio(); }); | 456 | audioIO->setOrientationGetter([this]{ return getMyAvatar()->getOrientationForAudio(); }); |
| 457 | 457 | ||
| 458 | audioIO->moveToThread(audioThread); | 458 | audioIO->moveToThread(audioThread); |
| 459 | recording::Frame::registerFrameHandler(AudioConstants::AUDIO_FRAME_NAME, [=](recording::Frame::ConstPointer frame) { | ||
| 460 | audioIO->handleRecordedAudioInput(frame->data); | ||
| 461 | }); | ||
| 462 | |||
| 463 | connect(audioIO.data(), &AudioClient::inputReceived, [](const QByteArray& audio){ | ||
| 464 | static auto recorder = DependencyManager::get<recording::Recorder>(); | ||
| 465 | if (recorder->isRecording()) { | ||
| 466 | static const recording::FrameType AUDIO_FRAME_TYPE = recording::Frame::registerFrameType(AudioConstants::AUDIO_FRAME_NAME); | ||
| 467 | recorder->recordFrame(AUDIO_FRAME_TYPE, audio); | ||
| 468 | } | ||
| 469 | }); | ||
| 459 | 470 | ||
| 460 | auto& audioScriptingInterface = AudioScriptingInterface::getInstance(); | 471 | auto& audioScriptingInterface = AudioScriptingInterface::getInstance(); |
| 461 | 472 | ||
| @@ -745,10 +756,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 283 unmodified lines | |||
| 745 | connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); | 756 | connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); |
| 746 | applicationUpdater->checkForUpdate(); | 757 | applicationUpdater->checkForUpdate(); |
| 747 | 758 | ||
| 748 | // Assign MyAvatar to th eRecording Singleton | ||
| 749 | DependencyManager::get<RecordingScriptingInterface>()->setControlledAvatar(getMyAvatar()); | ||
| 750 | |||
| 751 | |||
| 752 | // Now that menu is initalized we can sync myAvatar with it's state. | 759 | // Now that menu is initalized we can sync myAvatar with it's state. |
| 753 | getMyAvatar()->updateMotionBehaviorFromMenu(); | 760 | getMyAvatar()->updateMotionBehaviorFromMenu(); |
| 754 | 761 | ||
| @@ -843,8 +850,6 @@ void Application::cleanupBeforeQuit() { · 88 unmodified lines | |||
| 843 | #ifdef HAVE_IVIEWHMD | 850 | #ifdef HAVE_IVIEWHMD |
| 844 | DependencyManager::get<EyeTracker>()->setEnabled(false, true); | 851 | DependencyManager::get<EyeTracker>()->setEnabled(false, true); |
| 845 | #endif | 852 | #endif |
| 846 | DependencyManager::get<RecordingScriptingInterface>()->setControlledAvatar(nullptr); | ||
| 847 | |||
| 848 | AnimDebugDraw::getInstance().shutdown(); | 853 | AnimDebugDraw::getInstance().shutdown(); |
| 849 | 854 | ||
| 850 | // FIXME: once we move to shared pointer for the INputDevice we shoud remove this naked delete: | 855 | // FIXME: once we move to shared pointer for the INputDevice we shoud remove this naked delete: |