[][src]Struct mod_player::PlayerState

pub struct PlayerState {
    pub current_line: u32,
    pub song_has_ended: bool,
    pub has_looped: bool,
    // some fields omitted
}

Keeps track of all the dynamic state required for playing the song.

Fields

current_line: u32

current line position in the pattern. Every pattern has 64 lines

song_has_ended: bool

set when the song stops playing

has_looped: bool

set when the song loops. The player does not unset this flag after it has been set. To detect subsequent loops the flag to be manually unset by the client

Methods

impl PlayerState[src]

pub fn new(num_channels: u32, device_sample_rate: u32) -> PlayerState[src]

pub fn get_song_line<'a>(&self, song: &'a Song) -> &'a Vec<Note>[src]

Auto Trait Implementations

impl Send for PlayerState

impl Sync for PlayerState

Blanket Implementations

impl<T, U> Into for T where
    U: From<T>, 
[src]

impl<T> From for T[src]

impl<T, U> TryFrom for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T> Borrow for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> BorrowMut for T where
    T: ?Sized
[src]

impl<T, U> TryInto for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.