ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15k stars 2.21k forks source link

Add setting for the volume of ruleset elements (hitsounds) #28733

Open leocb opened 2 months ago

leocb commented 2 months ago

Hi! First time contributing here!

This PR adds the option to mute only hitsounds.

The setting is available on the main menu and on the play "quick" menu

I followed what was already in place for the mute mod and, while this aims to only mute hitsounds, AFAIK my implementation will mute any sounds coming from the ruleset drawable, I don't know if this impacts other desired sounds, if this is acceptable or if the name should be changed from "hitsounds" to something else to better reflect this "ruleset mute".

peppy commented 2 months ago

Thanks for your contribution.

I'd say the more desired behaviour is to have volume control for hitsounds, rather than a toggle.

leocb commented 2 months ago

This is a toggle as it's being applied as a multiplier on top of the effects volume, having a slider would make 100% be the same volume as the current effects volume, which may be confusing. I don't know if it can be easily separated into another slider without messing with framework too.

bdach commented 2 months ago

Also against this feature in its current form.

I don't know if it can be easily separated into another slider without messing with framework too.

Easiest path towards that would probably be to put gameplay samples on a separate mixer. Which is something we may want to do at some point anyway, but definitely will not be a 20-line diff like this is.

peppy commented 2 months ago

Easiest path towards that would probably be to put gameplay samples on a separate mixer. Which is something we may want to do at some point anyway, but definitely will not be a 20-line diff like this is.

Failing this, exposing an audio adjustment for the gameplay/ruleset audio container should be relatively simple.

leocb commented 2 months ago

I made some modifications in framework to allow mixers to have their own volume, now this PR depends on this one: ppy/osu-framework#6326 I removed the option from the play "quick" settings The ruleset container was changed to AudioMixerContainer and now has it's own mixer separate from the UI sfx I added a slider in the settings for the gameplay sounds volume and called it Gameplay feel free to suggest other names that better reflect what this does