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 | 456 | audioIO->setOrientationGetter([this]{ return getMyAvatar()->getOrientationForAudio(); }); |
| 457 | 457 | |
| 458 | 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 | 471 | auto& audioScriptingInterface = AudioScriptingInterface::getInstance(); |
| 461 | 472 | |
| @@ -745,10 +756,6 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 283 unmodified lines | ||
| 745 | 756 | connect(applicationUpdater.data(), &AutoUpdater::newVersionIsAvailable, dialogsManager.data(), &DialogsManager::showUpdateDialog); |
| 746 | 757 | applicationUpdater->checkForUpdate(); |
| 747 | 758 | |
| 748 | − // Assign MyAvatar to th eRecording Singleton | |
| 749 | − DependencyManager::get<RecordingScriptingInterface>()->setControlledAvatar(getMyAvatar()); | |
| 750 | − | |
| 751 | − | |
| 752 | 759 | // Now that menu is initalized we can sync myAvatar with it's state. |
| 753 | 760 | getMyAvatar()->updateMotionBehaviorFromMenu(); |
| 754 | 761 | |
| @@ -843,8 +850,6 @@ void Application::cleanupBeforeQuit() { · 88 unmodified lines | ||
| 843 | 850 | #ifdef HAVE_IVIEWHMD |
| 844 | 851 | DependencyManager::get<EyeTracker>()->setEnabled(false, true); |
| 845 | 852 | #endif |
| 846 | − DependencyManager::get<RecordingScriptingInterface>()->setControlledAvatar(nullptr); | |
| 847 | − | |
| 848 | 853 | AnimDebugDraw::getInstance().shutdown(); |
| 849 | 854 | |
| 850 | 855 | // FIXME: once we move to shared pointer for the INputDevice we shoud remove this naked delete: |