Class PlayList
java.lang.Object
de.pottgames.tuningfork.jukebox.playlist.PlayList
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final TuningForkLoggerprotected booleanprotected booleanprotected booleanprotected intprotected final com.badlogic.gdx.utils.Array<Song> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a song to the end of the list.booleanisLoop()Returns true if thisPlayListshould be played on repeat.booleanReturns true if the allSongs from the list have been fetched.nextSong()Returns the nextSongin the list.voidreset()Resets the index to 0, so the next call tonextSong()will return the first song in the list.voidsetLooping(boolean loop) If set to true, thisPlayListindicates that it should be played on repeat.voidsetShuffleAfterPlaytrough(boolean value) voidshuffle()Shuffles the internal list ofSongs.toString()
-
Field Details
-
logger
-
songs
-
songIndex
protected int songIndex -
playedThrough
protected boolean playedThrough -
loop
protected boolean loop -
shuffleAfterPlaytrough
protected boolean shuffleAfterPlaytrough
-
-
Constructor Details
-
PlayList
public PlayList()
-
-
Method Details
-
addSong
-
nextSong
-
reset
public void reset()Resets the index to 0, so the next call tonextSong()will return the first song in the list.isPlayedThrough()will return false afterwards. -
isPlayedThrough
public boolean isPlayedThrough()Returns true if the allSongs from the list have been fetched.- Returns:
- true if all songs have been fetched
-
shuffle
public void shuffle()Shuffles the internal list ofSongs. -
setShuffleAfterPlaytrough
-
setLooping
public void setLooping(boolean loop) If set to true, thisPlayListindicates that it should be played on repeat.- Parameters:
loop- true for looped playback
-
isLoop
public boolean isLoop()Returns true if thisPlayListshould be played on repeat.- Returns:
- true for repeat
-
toString
-