History

Restore legacy attenuation behavior for system sounds and scripts that do not set position. JS detects when "position" was not set by the script. C++ explicitly sets .positionSet=false when not set (for system sounds). Local rendering uses a direct mix (no attenuation/HRTF) when not set.

Ken Cooke committed 7 years ago

Commit fa08e421 parent fdd86878 files · +58 −25Browse files

Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all

Unified · Split

interface/src/Application.cpp+2−0
@@ -4030,7 +4030,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 4029 unmodified lines
40304030 if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) {
40314031 AudioInjectorOptions options;
40324032 options.localOnly = true;
4033+ options.positionSet = false; // system sound
40334034 options.stereo = true;
4035+
40344036 Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true };
40354037 Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true };
40364038 if (notificationSounds.get() && notificationSoundSnapshot.get()) {