mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 15:47:26 +08:00
Reduce the amount by which clicking the mute notification incraeses volume
This commit is contained in:
parent
a9c120c214
commit
b5771ece41
@ -264,13 +264,13 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestMutedNotificationMasterVolume()
|
||||
{
|
||||
addVolumeSteps("master volume", () => audioManager.Volume.Value = 0, () => audioManager.Volume.IsDefault);
|
||||
addVolumeSteps("master volume", () => audioManager.Volume.Value = 0, () => audioManager.Volume.Value == 0.5);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestMutedNotificationTrackVolume()
|
||||
{
|
||||
addVolumeSteps("music volume", () => audioManager.VolumeTrack.Value = 0, () => audioManager.VolumeTrack.IsDefault);
|
||||
addVolumeSteps("music volume", () => audioManager.VolumeTrack.Value = 0, () => audioManager.VolumeTrack.Value == 0.5);
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -539,10 +539,11 @@ namespace osu.Game.Screens.Play
|
||||
volumeOverlay.IsMuted.Value = false;
|
||||
|
||||
// Check values before resetting, as the user may have only had mute enabled, in which case we might not need to adjust volumes.
|
||||
// Note that we only restore halfway to ensure the user isn't suddenly overloaded by unexpectedly high volume.
|
||||
if (audioManager.Volume.Value <= volume_requirement)
|
||||
audioManager.Volume.SetDefault();
|
||||
audioManager.Volume.Value = 0.5f;
|
||||
if (audioManager.VolumeTrack.Value <= volume_requirement)
|
||||
audioManager.VolumeTrack.SetDefault();
|
||||
audioManager.VolumeTrack.Value = 0.5f;
|
||||
|
||||
return true;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user