Struct 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)

Sets a signal to modulate the effect’s mix level. Set to NULL to clear the modulator.

§getMixModulator: Option<unsafe extern "C" fn(effect: *mut SoundEffect) -> *mut PDSynthSignalValue>

PDSynthSignalValue* playdate->sound->effect->getMixModulator(SoundEffect* effect)

Returns the current mix modulator for the effect.

§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_overdrive

Trait Implementations§

Source§

impl Clone for playdate_sound_effect

Source§

fn clone(&self) -> playdate_sound_effect

Returns a duplicate of the value. Read more
1.0.0§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for playdate_sound_effect

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for playdate_sound_effect

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl Hash for playdate_sound_effect

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given [Hasher]. Read more
1.3.0§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given [Hasher]. Read more
Source§

impl Ord for playdate_sound_effect

Source§

fn cmp(&self, other: &playdate_sound_effect) -> Ordering

This method returns an [Ordering] between self and other. Read more
1.21.0§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for playdate_sound_effect

Source§

fn eq(&self, other: &playdate_sound_effect) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl PartialOrd for playdate_sound_effect

Source§

fn partial_cmp(&self, other: &playdate_sound_effect) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0§

fn lt(&self, other: &Rhs) -> bool

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0§

fn le(&self, other: &Rhs) -> bool

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0§

fn gt(&self, other: &Rhs) -> bool

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0§

fn ge(&self, other: &Rhs) -> bool

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl Copy for playdate_sound_effect

Source§

impl Eq for playdate_sound_effect

Source§

impl StructuralPartialEq for playdate_sound_effect

Auto Trait Implementations§

§

impl Freeze for playdate_sound_effect

§

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 T
where T: 'static + ?Sized,

§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
§

impl<T> Borrow<T> for T
where T: ?Sized,

§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
§

impl<T> BorrowMut<T> for T
where T: ?Sized,

§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
§

impl<T> CloneToUninit for T
where T: Clone,

§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
§

impl<T> From<T> for T

§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T, U> Into<U> for T
where U: From<T>,

§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of [From]<T> for U chooses to do.

§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

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

The type returned in the event of a conversion error.
§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.

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