Return stereo for music/ambient (#89470)

## About The Pull Request
Returns stereo sound for music and ambient, which was changed here =>
https://github.com/tgstation/tgstation/pull/55333
Due to the override environment (probably) absolutely ALL music was
downmixed to mono, such as music via global sound, direct sound to mob
and megafauna themes.
In addition to this, the sound from musical instruments at certain
positioning was sent exclusively to one ear, which made it extremely
uncomfortable to listen to with headphones.

Commenting of 183-189 lines was done to make proc local_sound work
correctly, otherwise an error occurs.

Video from the tests is attached, old - what we have at the moment; new
- what we get when commenting on the lines.
https://drive.google.com/file/d/1wSZ2I5XE74nePOTfMmaj-xqmonf3g58O/view
(too much weight, had to upload it on google-drive, I apologize for
that.)

## Why It's Good For The Game
Fixes the bug? Based on the PR with override environment, downmixing
music in mono was not planned.
Makes working with music and listening to it more comfortable

## Changelog
🆑
fix: remove downmix stereo=>mono where it is not required
/🆑
This commit is contained in:
EnnyDaiz
2025-03-17 02:02:50 +01:00
committed by GitHub
parent 889268c400
commit 61e0b8dcaa
+4 -28
View File
@@ -1,28 +1,3 @@
///Default override for echo
/sound
echo = list(
0, // Direct
0, // DirectHF
-10000, // Room, -10000 means no low frequency sound reverb
-10000, // RoomHF, -10000 means no high frequency sound reverb
0, // Obstruction
0, // ObstructionLFRatio
0, // Occlusion
0.25, // OcclusionLFRatio
1.5, // OcclusionRoomRatio
1.0, // OcclusionDirectRatio
0, // Exclusion
1.0, // ExclusionLFRatio
0, // OutsideVolumeHF
0, // DopplerFactor
0, // RolloffFactor
0, // RoomRolloffFactor
1.0, // AirAbsorptionFactor
0, // Flags (1 = Auto Direct, 2 = Auto Room, 4 = Auto RoomHF)
)
environment = SOUND_ENVIRONMENT_NONE //Default to none so sounds without overrides dont get reverb
/**
* playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
*
@@ -185,9 +160,10 @@
var/area/A = get_area(src)
sound_to_use.environment = A.sound_environment
if(use_reverb && sound_to_use.environment != SOUND_ENVIRONMENT_NONE) //We have reverb, reset our echo setting
sound_to_use.echo[3] = 0 //Room setting, 0 means normal reverb
sound_to_use.echo[4] = 0 //RoomHF setting, 0 means normal reverb.
if(!use_reverb || sound_to_use.environment == SOUND_ENVIRONMENT_NONE)
sound_to_use.echo ||= new /list(18)
sound_to_use.echo[3] = -10000
sound_to_use.echo[4] = -10000
if(HAS_TRAIT(src, TRAIT_SOUND_DEBUGGED))
to_chat(src, span_admin("Max Range-[max_distance] Distance-[distance] Vol-[round(sound_to_use.volume, 0.01)] Sound-[sound_to_use.file]"))