Skip to main content

NodeType

Enum NodeType 

Source
pub enum NodeType {
    Gain(GainNode),
    Oscillator(OscillatorNode),
    Microphone(MicrophoneNode),
    File(FileNode),
    Mixer(MixerNode),
    Delay(DelayNode),
    Convolver(ConvolverNode),
    Filter(FilterNode),
}
Expand description

Represents the different types of audio nodes available in the library.

Each variant wraps a specific node implementation.

Variants§

§

Gain(GainNode)

Adjusts the volume of the audio signal.

§

Oscillator(OscillatorNode)

Generates periodic waveforms (e.g., sine waves).

§

Microphone(MicrophoneNode)

Captures audio from the system’s default microphone.

§

File(FileNode)

Reads audio data from a file.

§

Mixer(MixerNode)

Mixes multiple audio signals together.

§

Delay(DelayNode)

Delays the audio signal by a specified amount of time.

§

Convolver(ConvolverNode)

Applies convolution (e.g., for reverb or IR effects).

§

Filter(FilterNode)

Applies biquad filtering (e.g., low-pass, high-pass).

Implementations§

Source§

impl NodeType

Source

pub fn process(&mut self, input: Option<&AudioUnit>, output: &mut AudioUnit)

Pulls audio data.

  • input: Audio segment processed by upstream nodes
  • output: Segment to write calculated audio into

Auto Trait Implementations§

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> 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<F, T> IntoSample<T> for F
where T: FromSample<F>,

Source§

fn into_sample(self) -> T

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>,