Make music pitch and speed go down on fail (like in osu!)
This commit is contained in:
@@ -237,6 +237,15 @@ public class MusicController {
|
||||
player.fade(duration, 0f, true);
|
||||
}
|
||||
|
||||
/**
|
||||
* Fades out the pitch (and speed) of the track.
|
||||
* @param duration the pitch fade time (in ms)
|
||||
*/
|
||||
public static void pitchFadeOut(int duration) {
|
||||
if (isPlaying())
|
||||
player.pitchFade(duration, 0f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the position in the current track, in milliseconds.
|
||||
* If no track is loaded, 0 will be returned.
|
||||
@@ -316,7 +325,7 @@ public class MusicController {
|
||||
* @param pitch the new pitch
|
||||
*/
|
||||
public static void setPitch(float pitch) {
|
||||
SoundStore.get().setMusicPitch(pitch);
|
||||
player.setPitch(pitch);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -464,4 +473,4 @@ public class MusicController {
|
||||
ErrorHandler.error("Failed to destroy OpenAL.", e, true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user