public interface TrackOrchestrator
A class to handle the way tracks are selected. This should ideally take in a
PlayActor to handle playing.-
Method Summary
Modifier and TypeMethodDescriptiongetTrackFromCollection(CollectionState collectionState) Gets a single track from a collection state.getTrackFromWeight(WeightsType weightsType) Selects a single track from a weight.voidplayCollection(CollectionType collectionType, boolean loop) Plays a collection of tracks.voidplayCollection(CollectionType collectionType, CollectionLimit collectionLimit) Plays a collection of tracks, with a limit on the number of tracks to play.voidPlays a single track.
-
Method Details
-
playTrack
-
playCollection
Plays a collection of tracks. If looping, it will continue until the program exits.- Parameters:
collectionType- The type of collection to playloop- Whether to loop the collection. If `false`, the collection will play each song once
-
playCollection
Plays a collection of tracks, with a limit on the number of tracks to play.- Parameters:
collectionType- The type of collection to playcollectionLimit- The limit of tracks to play
-
getTrackFromCollection
Gets a single track from a collection state. If the collection is sequential, it will return the next unplayed track in the collection.- Parameters:
collectionState- The collection state to get the track from- Returns:
- The track to play
-
getTrackFromWeight
Selects a single track from a weight.- Parameters:
weightsType- The type of weight to get the track from- Returns:
- The track to play
-