Struct nitro::audio::Playlist [] [src]

pub struct Playlist {
    pub shuffle: bool,
    pub loop_music: bool,
    // some fields omitted
}

Allows you to create and control playlists for music playback.

Playlists are optimized for music, if you want to play sound effects functions in nitro::Audio should be of assistance to you. Apps can have one active playlist at a time which lives in nitro::App.playlist. To change the playlist stop App.playlist then assign a new playlist to App.playlist and then start App.playlist.

Fields

If this is true playlist will be shuffled on start and on loop

If this is true playlist will loop back to start when music is finished.

Methods

impl Playlist
[src]

[src]

Creates a new playlist with no tracks, and shuffle and loop_music set to false.

[src]

Start playing this playlist.

Will not auto advance songs unless this playlist is attached to App::audio.playlist

[src]

Stops music playback

[src]

Advance to the next track in the playlist

[src]

Returns err if track is not a valid index into self.tracks

[src]

[src]

Adds a new track to the playlist. The first track added will be track 0 the second track will be track 1, so on so forth.

[src]

[src]