Struct playdate_sys::ffi::playdate_sound_effect
source · #[repr(C)]pub struct playdate_sound_effect {Show 13 fields
pub newEffect: Option<unsafe extern "C" fn(proc_: effectProc, userdata: *mut c_void) -> *mut SoundEffect>,
pub freeEffect: Option<unsafe extern "C" fn(effect: *mut SoundEffect)>,
pub setMix: Option<unsafe extern "C" fn(effect: *mut SoundEffect, level: c_float)>,
pub setMixModulator: Option<unsafe extern "C" fn(effect: *mut SoundEffect, signal: *mut PDSynthSignalValue)>,
pub getMixModulator: Option<unsafe extern "C" fn(effect: *mut SoundEffect) -> *mut PDSynthSignalValue>,
pub setUserdata: Option<unsafe extern "C" fn(effect: *mut SoundEffect, userdata: *mut c_void)>,
pub getUserdata: Option<unsafe extern "C" fn(effect: *mut SoundEffect) -> *mut c_void>,
pub twopolefilter: *const playdate_sound_effect_twopolefilter,
pub onepolefilter: *const playdate_sound_effect_onepolefilter,
pub bitcrusher: *const playdate_sound_effect_bitcrusher,
pub ringmodulator: *const playdate_sound_effect_ringmodulator,
pub delayline: *const playdate_sound_effect_delayline,
pub overdrive: *const playdate_sound_effect_overdrive,
}Fields§
§newEffect: Option<unsafe extern "C" fn(proc_: effectProc, userdata: *mut c_void) -> *mut SoundEffect>SoundEffect* playdate->sound->effect->newEffect(effectProc* proc, void* userdata)
effectProc
typedef int effectProc(SoundEffect* e, int32_t* left, int32_t* right, int nsamples, int bufactive);
Creates a new effect using the given processing function. bufactive is 1 if samples have been set in the left or right buffers. The function should return 1 if it changed the buffer samples, otherwise 0. left and right (if the effect is on a stereo channel) are sample buffers in Q8.24 format.
freeEffect: Option<unsafe extern "C" fn(effect: *mut SoundEffect)>void playdate->sound->effect->freeEffect(SoundEffect* effect)
Frees the given effect.
setMix: Option<unsafe extern "C" fn(effect: *mut SoundEffect, level: c_float)>void playdate->sound->effect->setMix(SoundEffect* effect, float level)
Sets the wet/dry mix for the effect. A level of 1 (full wet) replaces the input with the effect output; 0 leaves the effect out of the mix (which is useful if you’re using a delay line with taps and don’t want to hear the delay line itself).
setMixModulator: Option<unsafe extern "C" fn(effect: *mut SoundEffect, signal: *mut PDSynthSignalValue)>void playdate->sound->effect->setMixModulator(SoundEffect* effect, PDSynthSignalValue* signal)
getMixModulator: Option<unsafe extern "C" fn(effect: *mut SoundEffect) -> *mut PDSynthSignalValue>PDSynthSignalValue* playdate->sound->effect->getMixModulator(SoundEffect* effect)
Sets or gets a signal to modulate the effect’s mix level.
setUserdata: Option<unsafe extern "C" fn(effect: *mut SoundEffect, userdata: *mut c_void)>void playdate->sound->effect->setUserdata(SoundEffect* effect, void* userdata)
getUserdata: Option<unsafe extern "C" fn(effect: *mut SoundEffect) -> *mut c_void>void* playdate->sound->effect->getUserdata(SoundEffect* effect)
Sets or gets a userdata value for the effect.
twopolefilter: *const playdate_sound_effect_twopolefilter§onepolefilter: *const playdate_sound_effect_onepolefilter§bitcrusher: *const playdate_sound_effect_bitcrusher§ringmodulator: *const playdate_sound_effect_ringmodulator§delayline: *const playdate_sound_effect_delayline§overdrive: *const playdate_sound_effect_overdriveTrait Implementations§
source§impl Clone for playdate_sound_effect
impl Clone for playdate_sound_effect
source§fn clone(&self) -> playdate_sound_effect
fn clone(&self) -> playdate_sound_effect
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_effect
impl Debug for playdate_sound_effect
source§impl Default for playdate_sound_effect
impl Default for playdate_sound_effect
source§impl Hash for playdate_sound_effect
impl Hash for playdate_sound_effect
source§impl Ord for playdate_sound_effect
impl Ord for playdate_sound_effect
source§impl PartialEq for playdate_sound_effect
impl PartialEq for playdate_sound_effect
source§fn eq(&self, other: &playdate_sound_effect) -> bool
fn eq(&self, other: &playdate_sound_effect) -> bool
self and other values to be equal, and is used
by ==.source§impl PartialOrd for playdate_sound_effect
impl PartialOrd for playdate_sound_effect
impl Copy for playdate_sound_effect
impl Eq for playdate_sound_effect
impl StructuralEq for playdate_sound_effect
impl StructuralPartialEq for playdate_sound_effect
Auto Trait Implementations§
impl RefUnwindSafe for playdate_sound_effect
impl !Send for playdate_sound_effect
impl !Sync for playdate_sound_effect
impl Unpin for playdate_sound_effect
impl UnwindSafe for playdate_sound_effect
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: 52 bytes