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
4030 if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) {4030 if (!isShifted && !isMeta && !isOption && !event->isAutoRepeat()) {
4031 AudioInjectorOptions options;4031 AudioInjectorOptions options;
4032 options.localOnly = true;4032 options.localOnly = true;
4033 options.positionSet = false; // system sound
4033 options.stereo = true;4034 options.stereo = true;
4035
4034 Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true };4036 Setting::Handle<bool> notificationSounds{ MenuOption::NotificationSounds, true };
4035 Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true };4037 Setting::Handle<bool> notificationSoundSnapshot{ MenuOption::NotificationSoundsSnapshot, true };
4036 if (notificationSounds.get() && notificationSoundSnapshot.get()) {4038 if (notificationSounds.get() && notificationSoundSnapshot.get()) {