option to ignore beatmap sample volume
This commit is contained in:
parent
8891976d48
commit
08d9f4165a
|
@ -433,6 +433,7 @@ 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),
|
||||||
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) {
|
||||||
|
@ -1164,6 +1165,12 @@ public class Options {
|
||||||
*/
|
*/
|
||||||
public static float getHitSoundVolume() { return GameOption.HITSOUND_VOLUME.getIntegerValue() / 100f; }
|
public static float getHitSoundVolume() { return GameOption.HITSOUND_VOLUME.getIntegerValue() / 100f; }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns the default hit sound volume.
|
||||||
|
* @return the hit sound volume [0, 1]
|
||||||
|
*/
|
||||||
|
public static boolean ignoreBeatmapSampleVolume() { return GameOption.IGNORE_SAMPLE_VOLUME.bool; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the music offset time.
|
* Returns the music offset time.
|
||||||
* @return the offset (in milliseconds)
|
* @return the offset (in milliseconds)
|
||||||
|
|
|
@ -291,6 +291,10 @@ public class SoundController {
|
||||||
if (hitSound < 0)
|
if (hitSound < 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
if (Options.ignoreBeatmapSampleVolume()) {
|
||||||
|
sampleVolumeMultiplier = 1f;
|
||||||
|
}
|
||||||
|
|
||||||
float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume();
|
float volume = Options.getHitSoundVolume() * sampleVolumeMultiplier * Options.getMasterVolume();
|
||||||
if (volume == 0f)
|
if (volume == 0f)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -70,6 +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.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