Struct playdate_sys::ffi::playdate_sound_track
source · #[repr(C)]pub struct playdate_sound_track {Show 17 fields
pub newTrack: Option<unsafe extern "C" fn() -> *mut SequenceTrack>,
pub freeTrack: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>,
pub setInstrument: Option<unsafe extern "C" fn(track: *mut SequenceTrack, inst: *mut PDSynthInstrument)>,
pub getInstrument: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> *mut PDSynthInstrument>,
pub addNoteEvent: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32, len: u32, note: MIDINote, velocity: c_float)>,
pub removeNoteEvent: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32, note: MIDINote)>,
pub clearNotes: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>,
pub getControlSignalCount: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>,
pub getControlSignal: Option<unsafe extern "C" fn(track: *mut SequenceTrack, idx: c_int) -> *mut ControlSignal>,
pub clearControlEvents: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>,
pub getPolyphony: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>,
pub activeVoiceCount: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>,
pub setMuted: Option<unsafe extern "C" fn(track: *mut SequenceTrack, mute: c_int)>,
pub getLength: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> u32>,
pub getIndexForStep: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32) -> c_int>,
pub getNoteAtIndex: Option<unsafe extern "C" fn(track: *mut SequenceTrack, index: c_int, outStep: *mut u32, outLen: *mut u32, outNote: *mut MIDINote, outVelocity: *mut c_float) -> c_int>,
pub getSignalForController: Option<unsafe extern "C" fn(track: *mut SequenceTrack, controller: c_int, create: c_int) -> *mut ControlSignal>,
}
Fields§
§newTrack: Option<unsafe extern "C" fn() -> *mut SequenceTrack>
SequenceTrack* playdate->sound->track->newTrack(void)
Returns a new SequenceTrack.
freeTrack: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>
void playdate->sound->track->freeTrack(SequenceTrack* track)
Frees the SequenceTrack.
setInstrument: Option<unsafe extern "C" fn(track: *mut SequenceTrack, inst: *mut PDSynthInstrument)>
void playdate->sound->track->setInstrument(SequenceTrack* track, PDSynthInstrument* instrument)
getInstrument: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> *mut PDSynthInstrument>
PDSynthInstrument* playdate->sound->track->getInstrument(SequenceTrack* track)
Sets or gets the PDSynthInstrument assigned to the track.
addNoteEvent: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32, len: u32, note: MIDINote, velocity: c_float)>
void playdate->sound->track->addNoteEvent(SequenceTrack* track, uint32_t step, uint32_t length, MIDINote note, float vel)
Adds a single note event to the track.
removeNoteEvent: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32, note: MIDINote)>
void playdate->sound->track->removeNoteEvent(SequenceTrack* track, uint32_t step, MIDINote note)
Removes the event at step playing note.
clearNotes: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>
void playdate->sound->track->clearNotes(SequenceTrack* track)
Clears all notes from the track.
getControlSignalCount: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>
void playdate->sound->track->getControlSignalCount(SequenceTrack* track)
Returns the number of ControlSignal objects in the track.
getControlSignal: Option<unsafe extern "C" fn(track: *mut SequenceTrack, idx: c_int) -> *mut ControlSignal>
void playdate->sound->track->getControlSignal(SequenceTrack* track, int idx)
Returns the ControlSignal at index idx.
clearControlEvents: Option<unsafe extern "C" fn(track: *mut SequenceTrack)>
void playdate->sound->track->clearControlEvents(SequenceTrack* track)
Clears all ControlSignals from the track.
getPolyphony: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>
int playdate->sound->track->getPolyphony(SequenceTrack* track)
Returns the maximum number of simultaneously playing notes in the track. (Currently, this value is only set when the track was loaded from a MIDI file. We don’t yet track polyphony for user-created events.)
activeVoiceCount: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> c_int>
int playdate->sound->track->activeVoiceCount(SequenceTrack* track)
Returns the number of voices currently playing in the track’s instrument.
setMuted: Option<unsafe extern "C" fn(track: *mut SequenceTrack, mute: c_int)>
void playdate->sound->track->setMuted(SequenceTrack* track, int mute)
Mutes or unmutes the track.
getLength: Option<unsafe extern "C" fn(track: *mut SequenceTrack) -> u32>
int playdate->sound->track->getLength(SequenceTrack* track)
Returns the length, in steps, of the track—that is, the step where the last note in the track ends.
getIndexForStep: Option<unsafe extern "C" fn(track: *mut SequenceTrack, step: u32) -> c_int>
int playdate->sound->track->getIndexForStep(SequenceTrack* track, uint32_t step)
Returns the internal array index for the first note at the given step.
getNoteAtIndex: Option<unsafe extern "C" fn(track: *mut SequenceTrack, index: c_int, outStep: *mut u32, outLen: *mut u32, outNote: *mut MIDINote, outVelocity: *mut c_float) -> c_int>
int playdate->sound->track->getNoteAtIndex(SequenceTrack* track, int index, uint32_t* outStep, uint32_t* outLen, MIDINote* outNote, float* outVelocity)
If the given index is in range, sets the data in the out pointers and returns 1; otherwise, returns 0.
getSignalForController: Option<unsafe extern "C" fn(track: *mut SequenceTrack, controller: c_int, create: c_int) -> *mut ControlSignal>
void playdate->sound->track->getSignalForController(SequenceTrack* track, int controller, int create)
Returns the ControlSignal for MIDI controller number controller, creating it if the create flag is set and it doesn’t yet exist.
Trait Implementations§
source§impl Clone for playdate_sound_track
impl Clone for playdate_sound_track
source§fn clone(&self) -> playdate_sound_track
fn clone(&self) -> playdate_sound_track
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_track
impl Debug for playdate_sound_track
source§impl Default for playdate_sound_track
impl Default for playdate_sound_track
source§fn default() -> playdate_sound_track
fn default() -> playdate_sound_track
source§impl Hash for playdate_sound_track
impl Hash for playdate_sound_track
source§impl Ord for playdate_sound_track
impl Ord for playdate_sound_track
source§impl PartialEq for playdate_sound_track
impl PartialEq for playdate_sound_track
source§fn eq(&self, other: &playdate_sound_track) -> bool
fn eq(&self, other: &playdate_sound_track) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for playdate_sound_track
impl PartialOrd for playdate_sound_track
impl Copy for playdate_sound_track
impl Eq for playdate_sound_track
impl StructuralPartialEq for playdate_sound_track
Auto Trait Implementations§
impl Freeze for playdate_sound_track
impl RefUnwindSafe for playdate_sound_track
impl Send for playdate_sound_track
impl Sync for playdate_sound_track
impl Unpin for playdate_sound_track
impl UnwindSafe for playdate_sound_track
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, 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: 68 bytes