-
Notifications
You must be signed in to change notification settings - Fork 20
MP3 Player sounds don't use snd_musicvolume #1209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MP3 Player sounds don't use snd_musicvolume #1209
Conversation
sunzenshen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, while it's kind of cursed that the sliders don't update live after the cvar cl_neo_radio_volume and cl_neo_radio_volume_ingame commands, I think trying to update the sliders might involve needing to poll the cvars, and at that point the patch might be worse than the bug.
Plus end user case of a player interacting with GUI sliders is not affected, so I think the main use case still works alright.
|
I added a change callback to the convars to set the slider values |
sunzenshen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that the Mute checkbox is intuitive since on my machine the music just plays at minimum volume, but at least the cvars now update the sliders as expected.

Description
Setting the volume of a music sound to 0 pauses that sound, thus muting in the mp3 player is notpossible in the traditional sense and instead the music is just turned down to the minimum possible value. This value changes depending on the value of snd_musicvolume, this PR uses a neat little workaround so that snd_musicvolume is ignored by sounds played through the mp3 player but the other advantages of the "#" sound character are still present.
Also I noticed the volume slider convar values were not being updated unless the slider that was currently affecting mp3 playback was moved (so changing the in game slider only when in the main menu and then quitting the game would not save that change), so I changed those values to be updated when the slider posts an action signal once the user stops dragging the slider
Toolchain
Linked Issues