public interface Music
extends org.mini2Dx.gdx.utils.Disposable
Modifier and Type | Method and Description |
---|---|
long |
getId()
Returns the unique ID for this instance
|
float |
getPosition()
Returns the playback position
|
float |
getVolume()
Returns the volume of the music
|
boolean |
isLooping()
Returns if the music will loop
|
boolean |
isPlaying()
Returns if the music is playing
|
void |
pause()
Pauses the playback if it is currently playing
|
void |
play()
Starts playing the music stream.
|
void |
setLooping(boolean isLooping)
Sets if the music should loop.
|
void |
setVolume(float volume)
Sets the volume of the music
|
void |
stop()
Stops the playback if it is paused or currently playing.
|
long getId()
void play()
void pause()
void stop()
play()
will start playback from the beginning.boolean isPlaying()
void setLooping(boolean isLooping)
isLooping
- True if the music should loop.boolean isLooping()
void setVolume(float volume)
volume
- A value between 0.0 and 1.0 where 0.0 is silent and 1.0 is maximum volume.float getVolume()
float getPosition()