public class CrossFadingMusicLoop
extends java.lang.Object
update()
each frame when using this
objectModifier and Type | Class and Description |
---|---|
class |
CrossFadingMusicLoop.ScheduleStop |
Constructor and Description |
---|
CrossFadingMusicLoop(com.badlogic.gdx.files.FileHandle musicFile,
float crossfadeTime,
float crossfadeDuration)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Cleans up resources.
|
void |
fadeOut(float duration) |
void |
fadeOutAndStop(float duration) |
boolean |
isPlaying()
Returns if the loop is playing
|
void |
play()
Starts playing the loop
|
void |
setVolume(float volume) |
void |
stop()
Stops playing the loop
|
void |
update()
Updates the crossfading of the track
|
public CrossFadingMusicLoop(com.badlogic.gdx.files.FileHandle musicFile, float crossfadeTime, float crossfadeDuration)
musicFile
- The FileHandle
for the music to be loopedcrossfadeTime
- The time (in seconds) at which the crossfade begins at the end
of the trackcrossfadeDuration
- The duration of the crossfade in secondspublic void update()
public void play()
public void stop()
public boolean isPlaying()
public void dispose()
public void setVolume(float volume)
public void fadeOut(float duration)
public void fadeOutAndStop(float duration)