AudioEffect

Struct AudioEffect 

Source
pub struct AudioEffect<T: FloatType + Float> { /* private fields */ }
Expand description

Shared pointer to an audio effect, using Arc for thread-safe access.

Trait Implementations§

Source§

impl<T: FloatType + Float> AudioEffectImpl<T> for AudioEffect<T>

Source§

fn new<const N: usize>( name: &str, param_props: ParamPropDesk<'_, N>, processor: Box<dyn AudioEffectTrait<T>>, ) -> Self

Creates a new audio effect with the given name, parameter properties, and processor. The const generic N specifies the number of parameters.
Source§

fn use_filter_in(&mut self, use_filter: bool)

Enables or disables the input filter before processing.
Source§

fn use_filter_out(&mut self, use_filter: bool)

Enables or disables the output filter after processing.
Source§

fn is_using_filter_in(&self) -> bool

Checks if the input filter is enabled.
Source§

fn is_using_filter_out(&self) -> bool

Checks if the output filter is enabled.
Source§

fn get_name(&self) -> &str

Gets the name of the effect.
Source§

fn get_mix(&self) -> f32

Gets the current mix level.
Source§

fn set_mix(&mut self, mix: f32)

Sets the mix level (clamped between 0.0 and 1.0).
Source§

fn set_low_cut_in(&mut self, cut: f32)

Sets the low-cut frequency for the input filter (clamped between 10.0 and 22050.0 Hz).
Source§

fn get_low_cut_in(&self) -> f32

Gets the low-cut frequency for the input filter.
Source§

fn set_high_cut_in(&mut self, cut: f32)

Sets the high-cut frequency for the input filter (clamped between 10.0 and 22050.0 Hz).
Source§

fn get_high_cut_in(&self) -> f32

Gets the high-cut frequency for the input filter.
Source§

fn set_low_cut_out(&mut self, cut: f32)

Sets the low-cut frequency for the output filter (clamped between 10.0 and 22050.0 Hz).
Source§

fn get_low_cut_out(&self) -> f32

Gets the low-cut frequency for the output filter.
Source§

fn set_high_cut_out(&mut self, cut: f32)

Sets the high-cut frequency for the output filter (clamped between 10.0 and 22050.0 Hz).
Source§

fn get_high_cut_out(&self) -> f32

Gets the high-cut frequency for the output filter.
Source§

fn get_params(&self) -> &FxHashMap<String, EffectParamType>

Gets a reference to the map of all parameters and their types.
Source§

fn set_param( &mut self, name: &str, value: EffectParamValue<'_>, ) -> AudioEffectState

Sets a parameter by name. Returns the state after setting.
Source§

fn get_param( &self, name: &str, ) -> Result<EffectParamValue<'_>, AudioEffectState>

Gets a parameter value by name. Returns the value or an error state.
Source§

impl<T: Clone + FloatType + Float> Clone for AudioEffect<T>

Source§

fn clone(&self) -> AudioEffect<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more

Auto Trait Implementations§

§

impl<T> Freeze for AudioEffect<T>

§

impl<T> RefUnwindSafe for AudioEffect<T>

§

impl<T> !Send for AudioEffect<T>

§

impl<T> !Sync for AudioEffect<T>

§

impl<T> Unpin for AudioEffect<T>

§

impl<T> UnwindSafe for AudioEffect<T>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

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

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

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

Source§

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

Mutably borrows from an owned value. Read more
Source§

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

Source§

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

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<S> FromSample<S> for S

Source§

fn from_sample_(s: S) -> S

Source§

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

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

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

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

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

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

impl<T, U> ToSample<U> for T
where U: FromSample<T>,

Source§

fn to_sample_(self) -> U

Source§

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

Source§

type Error = Infallible

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

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

Performs the conversion.
Source§

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

Source§

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

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

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

Performs the conversion.
Source§

impl<S, T> Duplex<S> for T
where T: FromSample<S> + ToSample<S>,