make sample override a percent instread of boolean
This commit is contained in:
parent
1f68136639
commit
d424db9a7f
|
@ -435,7 +435,15 @@ public class Options {
|
||||||
container.setMusicVolume(getMasterVolume() * getMusicVolume());
|
container.setMusicVolume(getMasterVolume() * getMusicVolume());
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
IGNORE_SAMPLE_VOLUME ("Ignore sample volume", "IgnoreBMSample", "Ignore hitsound volume set by beatmap", true),
|
SAMPLE_VOLUME_OVERRIDE ("Sample volume override", "BMSampleOverride", "Override beatmap hitsound volume", 100, 0, 100) {
|
||||||
|
@Override
|
||||||
|
public String getValueString() {
|
||||||
|
if (val == 0) {
|
||||||
|
return "Disabled";
|
||||||
|
}
|
||||||
|
return super.getValueString();
|
||||||
|
}
|
||||||
|
},
|
||||||
EFFECT_VOLUME ("Effect Volume", "VolumeEffect", "Volume of menu and game sounds.", 70, 0, 100),
|
EFFECT_VOLUME ("Effect Volume", "VolumeEffect", "Volume of menu and game sounds.", 70, 0, 100),
|
||||||
HITSOUND_VOLUME ("Hit Sound Volume", "VolumeHitSound", "Volume of hit sounds.", 30, 0, 100),
|
HITSOUND_VOLUME ("Hit Sound Volume", "VolumeHitSound", "Volume of hit sounds.", 30, 0, 100),
|
||||||
MUSIC_OFFSET ("Music Offset", "Offset", "Adjust this value if hit objects are out of sync.", -75, -500, 500) {
|
MUSIC_OFFSET ("Music Offset", "Offset", "Adjust this value if hit objects are out of sync.", -75, -500, 500) {
|
||||||
|
@ -1272,7 +1280,7 @@ public class Options {
|
||||||
* Returns the default hit sound volume.
|
* Returns the default hit sound volume.
|
||||||
* @return the hit sound volume [0, 1]
|
* @return the hit sound volume [0, 1]
|
||||||
*/
|
*/
|
||||||
public static boolean ignoreBeatmapSampleVolume() { return GameOption.IGNORE_SAMPLE_VOLUME.bool; }
|
public static float getSampleVolumeOverride() { return GameOption.SAMPLE_VOLUME_OVERRIDE.val / 100f; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the music offset time.
|
* Returns the music offset time.
|
||||||
|
|
|
@ -291,8 +291,8 @@ public class SoundController {
|
||||||
if (hitSound < 0)
|
if (hitSound < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Options.ignoreBeatmapSampleVolume()) {
|
if (Options.getSampleVolumeOverride() > 0) {
|
||||||
sampleVolumeMultiplier = 1f;
|
sampleVolumeMultiplier = Options.getSampleVolumeOverride();
|
||||||
}
|
}
|
||||||
|
|
||||||
float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume();
|
float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume();
|
||||||
|
|
|
@ -70,7 +70,7 @@ public class OptionsMenu extends BasicGameState {
|
||||||
GameOption.MUSIC_VOLUME,
|
GameOption.MUSIC_VOLUME,
|
||||||
GameOption.EFFECT_VOLUME,
|
GameOption.EFFECT_VOLUME,
|
||||||
GameOption.HITSOUND_VOLUME,
|
GameOption.HITSOUND_VOLUME,
|
||||||
GameOption.IGNORE_SAMPLE_VOLUME,
|
GameOption.SAMPLE_VOLUME_OVERRIDE,
|
||||||
GameOption.MUSIC_OFFSET,
|
GameOption.MUSIC_OFFSET,
|
||||||
GameOption.DISABLE_SOUNDS,
|
GameOption.DISABLE_SOUNDS,
|
||||||
GameOption.ENABLE_THEME_SONG
|
GameOption.ENABLE_THEME_SONG
|
||||||
|
|
Loading…
Reference in New Issue
Block a user