#[repr(C)]pub struct playdate_sound_sequence {Show 20 fields
pub newSequence: Option<unsafe extern "C" fn() -> *mut SoundSequence>,
pub freeSequence: Option<unsafe extern "C" fn(sequence: *mut SoundSequence)>,
pub loadMIDIFile: Option<unsafe extern "C" fn(seq: *mut SoundSequence, path: *const c_char) -> c_int>,
pub getTime: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> u32>,
pub setTime: Option<unsafe extern "C" fn(seq: *mut SoundSequence, time: u32)>,
pub setLoops: Option<unsafe extern "C" fn(seq: *mut SoundSequence, loopstart: c_int, loopend: c_int, loops: c_int)>,
pub getTempo_deprecated: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>,
pub setTempo: Option<unsafe extern "C" fn(seq: *mut SoundSequence, stepsPerSecond: c_float)>,
pub getTrackCount: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>,
pub addTrack: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> *mut SequenceTrack>,
pub getTrackAtIndex: Option<unsafe extern "C" fn(seq: *mut SoundSequence, track: c_uint) -> *mut SequenceTrack>,
pub setTrackAtIndex: Option<unsafe extern "C" fn(seq: *mut SoundSequence, track: *mut SequenceTrack, idx: c_uint)>,
pub allNotesOff: Option<unsafe extern "C" fn(seq: *mut SoundSequence)>,
pub isPlaying: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>,
pub getLength: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> u32>,
pub play: Option<unsafe extern "C" fn(seq: *mut SoundSequence, finishCallback: SequenceFinishedCallback, userdata: *mut c_void)>,
pub stop: Option<unsafe extern "C" fn(seq: *mut SoundSequence)>,
pub getCurrentStep: Option<unsafe extern "C" fn(seq: *mut SoundSequence, timeOffset: *mut c_int) -> c_int>,
pub setCurrentStep: Option<unsafe extern "C" fn(seq: *mut SoundSequence, step: c_int, timeOffset: c_int, playNotes: c_int)>,
pub getTempo: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_float>,
}Fields§
§newSequence: Option<unsafe extern "C" fn() -> *mut SoundSequence>SoundSequence* playdate->sound->sequence->newSequence(void)
freeSequence: Option<unsafe extern "C" fn(sequence: *mut SoundSequence)>void playdate->sound->sequence->freeSequence(SoundSequence* sequence)
Creates or destroys a SoundSequence object.
loadMIDIFile: Option<unsafe extern "C" fn(seq: *mut SoundSequence, path: *const c_char) -> c_int>int playdate->sound->sequence->loadMIDIFile(SoundSequence* sequence, const char* path)
If the sequence is empty, attempts to load data from the MIDI file at path into the sequence. Returns 1 on success, 0 on failure.
getTime: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> u32>uint32_t playdate->sound->sequence->getTime(SoundSequence* sequence)
setTime: Option<unsafe extern "C" fn(seq: *mut SoundSequence, time: u32)>void playdate->sound->sequence->setTime(SoundSequence* sequence, uint32_t time)
Gets or sets the current time in the sequence, in samples since the start of the file. Note that which step this moves the sequence to depends on the current tempo.
setLoops: Option<unsafe extern "C" fn(seq: *mut SoundSequence, loopstart: c_int, loopend: c_int, loops: c_int)>void playdate->sound->sequence->setLoops(SoundSequence* sequence, int startstep, int endstep, int loops)
Sets the looping range of the sequence. If loops is 0, the loop repeats endlessly.
getTempo_deprecated: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>§setTempo: Option<unsafe extern "C" fn(seq: *mut SoundSequence, stepsPerSecond: c_float)>void playdate->sound->sequence->setTempo(SoundSequence* sequence, float stepsPerSecond)
Sets or gets the tempo of the sequence, in steps per second.
getTrackCount: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>int playdate->sound->sequence->getTrackCount(SoundSequence* sequence)
Returns the number of tracks in the sequence.
addTrack: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> *mut SequenceTrack>SequenceTrack* playdate->sound->sequence->addTrack(SoundSequence* sequence)
Adds the given playdate.sound.track to the sequence.
getTrackAtIndex: Option<unsafe extern "C" fn(seq: *mut SoundSequence, track: c_uint) -> *mut SequenceTrack>SequenceTrack* playdate->sound->sequence->getTrackAtIndex(SoundSequence* sequence, unsigned int idx)
setTrackAtIndex: Option<unsafe extern "C" fn(seq: *mut SoundSequence, track: *mut SequenceTrack, idx: c_uint)>void playdate->sound->sequence->setTrackAtIndex(SoundSequence* sequence, SequenceTrack* track, unsigned int idx)
Sets or gets the given SoundTrack object at position idx in the sequence.
allNotesOff: Option<unsafe extern "C" fn(seq: *mut SoundSequence)>void playdate->sound->sequence->allNotesOff(SoundSequence* sequence)
Sends a stop signal to all playing notes on all tracks.
isPlaying: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_int>int playdate->sound->sequence->isPlaying(SoundSequence* sequence)
Returns 1 if the sequence is currently playing, otherwise 0.
getLength: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> u32>int playdate->sound->sequence->getLength(SoundSequence* sequence)
Returns the length of the longest track in the sequence, in steps. See also playdate.sound.track.getLength().
play: Option<unsafe extern "C" fn(seq: *mut SoundSequence, finishCallback: SequenceFinishedCallback, userdata: *mut c_void)>void playdate->sound->sequence->play(SoundSequence* sequence, SequenceFinishedCallback finishCallback, void* userdata)
stop: Option<unsafe extern "C" fn(seq: *mut SoundSequence)>void playdate->sound->sequence->stop(SoundSequence* sequence)
Starts or stops playing the sequence. finishCallback is an optional function to be called when the sequence finishes playing or is stopped.
SequenceFinishedCallback
typedef void (*SequenceFinishedCallback)(SoundSequence* seq, void* userdata);getCurrentStep: Option<unsafe extern "C" fn(seq: *mut SoundSequence, timeOffset: *mut c_int) -> c_int>int playdate->sound->sequence->getCurrentStep(SoundSequence* sequence, int* timeOffset)
Returns the step number the sequence is currently at. If timeOffset is not NULL, its contents are set to the current sample offset within the step.
setCurrentStep: Option<unsafe extern "C" fn(seq: *mut SoundSequence, step: c_int, timeOffset: c_int, playNotes: c_int)>void playdate->sound->sequence->setCurrentStep(SoundSequence* seq, int step, int timeOffset, int playNotes)
Set the current step for the sequence. timeOffset is a sample offset within the step. If playNotes is set, notes at the given step (ignoring timeOffset) are played.
getTempo: Option<unsafe extern "C" fn(seq: *mut SoundSequence) -> c_float>float playdate->sound->sequence->getTempo(SoundSequence* sequence)
Trait Implementations§
Source§impl Clone for playdate_sound_sequence
impl Clone for playdate_sound_sequence
Source§fn clone(&self) -> playdate_sound_sequence
fn clone(&self) -> playdate_sound_sequence
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for playdate_sound_sequence
impl Debug for playdate_sound_sequence
Source§impl Default for playdate_sound_sequence
impl Default for playdate_sound_sequence
Source§fn default() -> playdate_sound_sequence
fn default() -> playdate_sound_sequence
Source§impl Hash for playdate_sound_sequence
impl Hash for playdate_sound_sequence
Source§impl Ord for playdate_sound_sequence
impl Ord for playdate_sound_sequence
Source§impl PartialEq for playdate_sound_sequence
impl PartialEq for playdate_sound_sequence
Source§impl PartialOrd for playdate_sound_sequence
impl PartialOrd for playdate_sound_sequence
Source§fn partial_cmp(&self, other: &playdate_sound_sequence) -> Option<Ordering>
fn partial_cmp(&self, other: &playdate_sound_sequence) -> Option<Ordering>
impl Copy for playdate_sound_sequence
impl Eq for playdate_sound_sequence
impl StructuralPartialEq for playdate_sound_sequence
Auto Trait Implementations§
impl Freeze for playdate_sound_sequence
impl RefUnwindSafe for playdate_sound_sequence
impl Send for playdate_sound_sequence
impl Sync for playdate_sound_sequence
impl Unpin for playdate_sound_sequence
impl UnwindSafe for playdate_sound_sequence
Blanket Implementations§
§impl<T> Any for Twhere
T: 'static + ?Sized,
impl<T> Any for Twhere
T: 'static + ?Sized,
§impl<T> Borrow<T> for Twhere
T: ?Sized,
impl<T> Borrow<T> for Twhere
T: ?Sized,
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
clone_to_uninit)§impl<T, U> Into<U> for Twhere
U: From<T>,
impl<T, U> Into<U> for Twhere
U: From<T>,
§impl<T> ToOwned for Twhere
T: Clone,
impl<T> ToOwned for Twhere
T: Clone,
§impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
impl<T, U> TryFrom<U> for Twhere
U: Into<T>,
Layout§
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...) attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 80 bytes