Yellow-Dog-Man / Resonite-Issues

Issue repository for Resonite.
https://resonite.com
118 stars 1 forks source link

AudioOutputs with invalid AudioTypeGroup enum bypass all volume settings including master volume #2014

Closed 5H4D0W-X closed 1 week ago

5H4D0W-X commented 1 month ago

Describe the bug?

When the AudioTypeGroup on an AudioOutput is not a valid enum (such as when it is -1), the volume of the output does not update when the player changes their volume settings.

To Reproduce

Spawn a sound player and use IntToEnum<AudioTypeGroup> to drive/write the AudioTypeGroup of the output to an invalid enum (-1 or 4). This must be done while the player is actively playing audio. Then change your volume settings. The volume of the playback stays the same even when master volume gets set to 0.

Alternatively, spawn the item called Audio Settings Bypass from this folder

resrec:///U-ShadowX/R-C12F154C3D6E3F6D5817502D52F6C08BCA71AC2511002EB461D3F87C4966EB99

and turn on the bool toggle while the sound effect is playing. Then change your volume settings and notice that the playback does not change in volume.

Expected behavior

The AudioOutput falls back to a default audio type (such as multimedia) when provided with an invalid enum or doesn't play at all.

Screenshots

No response

Resonite Version Number

Beta 2024.5.7.505

What Platforms does this occur on?

Windows

What headset if any do you use?

Quest 2, Desktop

Log Files

Unable to add at the moment

Additional Context

This is urgent because it could allow players to harass others with loud sound effects that can only be stopped/made quieter by leaving the world. This could be dangerous to players with auditory processing disorders or sound-sensitive epilepsy.

Reporters

Sloppy McFloppy ShadowX

Frooxius commented 1 week ago

Fixed in 2024.6.5.198, now invalid audio group will result in the audio simply being inaudible. Thanks for report!