Showing the changes to interface/src/Application.cpp (1 of 5 files). Show all
Unified · Split
| @@ -2787,7 +2787,7 @@ void Application::displayStats() { · 2786 unmodified lines | |||
| 2787 | 2787 | ||
| 2788 | glm::vec3 avatarPos = _myAvatar->getPosition(); | 2788 | glm::vec3 avatarPos = _myAvatar->getPosition(); |
| 2789 | 2789 | ||
| 2790 | lines = _statsExpanded ? 5 : 3; | 2790 | lines = _statsExpanded ? 8 : 3; |
| 2791 | displayStatsBackground(backgroundColor, horizontalOffset, 0, _glWidget->width() - (mirrorEnabled ? 301 : 411) - horizontalOffset, lines * STATS_PELS_PER_LINE + 10); | 2791 | displayStatsBackground(backgroundColor, horizontalOffset, 0, _glWidget->width() - (mirrorEnabled ? 301 : 411) - horizontalOffset, lines * STATS_PELS_PER_LINE + 10); |
| 2792 | horizontalOffset += 5; | 2792 | horizontalOffset += 5; |
| 2793 | 2793 | ||
| @@ -2840,26 +2840,34 @@ void Application::displayStats() { · 46 unmodified lines | |||
| 2840 | // add some reflection stats | 2840 | // add some reflection stats |
| 2841 | char reflectionsStatus[128]; | 2841 | char reflectionsStatus[128]; |
| 2842 | 2842 | ||
| 2843 | sprintf(reflectionsStatus, "Reflections: %d, Pre-Delay: %f, Separate Ears:%s", | 2843 | sprintf(reflectionsStatus, "Reflections: %d, Original: %s, Ears: %s, Source: %s", |
| 2844 | _audioReflector.getReflections(), | 2844 | _audioReflector.getReflections(), |
| 2845 | _audioReflector.getDelayFromDistance(0.0f), | 2845 | (Menu::getInstance()->isOptionChecked(MenuOption::AudioSpatialProcessingIncudeOriginal) |
| 2846 | debug::valueOf(Menu::getInstance()->isOptionChecked(MenuOption::AudioSpatialProcessingSeparateEars))); | 2846 | ? "with" : "without"), |
| 2847 | (Menu::getInstance()->isOptionChecked(MenuOption::AudioSpatialProcessingSeparateEars) | ||
| 2848 | ? "two" : "one"), | ||
| 2849 | (Menu::getInstance()->isOptionChecked(MenuOption::AudioSpatialProcessingStereoSource) | ||
| 2850 | ? "stereo" : "mono") | ||
| 2851 | ); | ||
| 2847 | 2852 | ||
| 2848 | verticalOffset += STATS_PELS_PER_LINE; | 2853 | verticalOffset += STATS_PELS_PER_LINE; |
| 2849 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); | 2854 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); |
| 2850 | 2855 | ||
| 2851 | sprintf(reflectionsStatus, "Delay: average %f, max %f, min %f", | 2856 | sprintf(reflectionsStatus, "Delay: pre: %f, average %f, max %f, min %f, speed: %f", |
| 2857 | _audioReflector.getDelayFromDistance(0.0f), | ||
| 2852 | _audioReflector.getAverageDelayMsecs(), | 2858 | _audioReflector.getAverageDelayMsecs(), |
| 2853 | _audioReflector.getMaxDelayMsecs(), | 2859 | _audioReflector.getMaxDelayMsecs(), |
| 2854 | _audioReflector.getMinDelayMsecs()); | 2860 | _audioReflector.getMinDelayMsecs(), |
| 2861 | _audioReflector.getSoundMsPerMeter()); | ||
| 2855 | 2862 | ||
| 2856 | verticalOffset += STATS_PELS_PER_LINE; | 2863 | verticalOffset += STATS_PELS_PER_LINE; |
| 2857 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); | 2864 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); |
| 2858 | 2865 | ||
| 2859 | sprintf(reflectionsStatus, "Attenuation: average %f, max %f, min %f", | 2866 | sprintf(reflectionsStatus, "Attenuation: average %f, max %f, min %f, distance scale: %f", |
| 2860 | _audioReflector.getAverageAttenuation(), | 2867 | _audioReflector.getAverageAttenuation(), |
| 2861 | _audioReflector.getMaxAttenuation(), | 2868 | _audioReflector.getMaxAttenuation(), |
| 2862 | _audioReflector.getMinAttenuation()); | 2869 | _audioReflector.getMinAttenuation(), |
| 2870 | _audioReflector.getDistanceAttenuationScalingFactor()); | ||
| 2863 | 2871 | ||
| 2864 | verticalOffset += STATS_PELS_PER_LINE; | 2872 | verticalOffset += STATS_PELS_PER_LINE; |
| 2865 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); | 2873 | drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, reflectionsStatus, WHITE_TEXT); |
| @@ -3725,6 +3733,7 @@ void Application::loadScript(const QString& scriptName) { · 859 unmodified lines | |||
| 3725 | scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance()); | 3733 | scriptEngine->registerGlobalObject("Menu", MenuScriptingInterface::getInstance()); |
| 3726 | scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance()); | 3734 | scriptEngine->registerGlobalObject("Settings", SettingsScriptingInterface::getInstance()); |
| 3727 | scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance()); | 3735 | scriptEngine->registerGlobalObject("AudioDevice", AudioDeviceScriptingInterface::getInstance()); |
| 3736 | scriptEngine->registerGlobalObject("AudioReflector", &_audioReflector); | ||
| 3728 | 3737 | ||
| 3729 | QThread* workerThread = new QThread(this); | 3738 | QThread* workerThread = new QThread(this); |
| 3730 | 3739 | ||