seconds of the loaded track
stops what plays and makes this track the one to play; a rendered MIDI file is copied into a buffer first
plays the loaded track from the start, or from pos
seconds into the track, held while paused
moves the playhead, keeping a paused track paused
stops and forgets the position; play() starts over
pauses a playing track and resumes a paused one
call each frame: fires onEnded once when a non-repeating track has finished
One music track at a time with the controls a game's jukebox needs: load a decoded track or a rendered MIDI file, play, pause, resume, read the position, seek, and be told when the track ends so the game can pick the next one. It wraps a
Channel, so the buffer, the loop region and the playhead behave as they do there; what it adds is the paused state and the end of the track. LikeMusic, nothing advances on its own: callupdate()each frame.Example