pub struct PlayerState {
pub song_pattern_position: u32,
pub current_line: u32,
pub song_has_ended: bool,
pub has_looped: bool,
/* private fields */
}Expand description
Keeps track of all the dynamic state required for playing the song.
Fields§
§song_pattern_position: u32§current_line: u32current line position in the pattern. Every pattern has 64 lines
song_has_ended: boolset when the song stops playing
has_looped: boolset 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
Implementations§
Source§impl PlayerState
impl PlayerState
pub fn new(num_channels: u32, device_sample_rate: u32) -> PlayerState
pub fn get_song_line<'a>(&self, song: &'a Song) -> &'a Vec<Note>
Auto Trait Implementations§
impl Freeze for PlayerState
impl RefUnwindSafe for PlayerState
impl Send for PlayerState
impl Sync for PlayerState
impl Unpin for PlayerState
impl UnwindSafe for PlayerState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more