[][src]Struct webrtc_audio_processing::Processor

pub struct Processor { /* fields omitted */ }

Processor provides an access to webrtc's audio processing e.g. echo cancellation and automatic gain control. It can be cloned, and cloned instances share the same underlying processor module. It's the recommended way to run the Processor in multi-threaded application.

Implementations

impl Processor[src]

pub fn new(config: &InitializationConfig) -> Result<Self, Error>[src]

Creates a new Processor. InitializationConfig is only used on instantiation, however new configs can be be passed to set_config() at any time during processing.

pub fn process_capture_frame(&mut self, frame: &mut [f32]) -> Result<(), Error>[src]

Processes and modifies the audio frame from a capture device by applying signal processing as specified in the config. frame should hold an interleaved f32 audio frame, with NUM_SAMPLES_PER_FRAME samples.

pub fn process_capture_frame_noninterleaved(
    &mut self,
    frame: &mut Vec<Vec<f32>>
) -> Result<(), Error>
[src]

Processes and modifies the audio frame from a capture device by applying signal processing as specified in the config. frame should be a Vec of length 'num_capture_channels', with each inner Vec representing a channel with NUM_SAMPLES_PER_FRAME samples.

pub fn process_render_frame(&mut self, frame: &mut [f32]) -> Result<(), Error>[src]

Processes and optionally modifies the audio frame from a playback device. frame should hold an interleaved f32 audio frame, with NUM_SAMPLES_PER_FRAME samples.

pub fn process_render_frame_noninterleaved(
    &mut self,
    frame: &mut Vec<Vec<f32>>
) -> Result<(), Error>
[src]

Processes and optionally modifies the audio frame from a playback device. frame should be a Vec of length 'num_render_channels', with each inner Vec representing a channel with NUM_SAMPLES_PER_FRAME samples.

pub fn get_stats(&self) -> Stats[src]

Returns statistics from the last process_capture_frame() call.

pub fn set_config(&mut self, config: Config)[src]

Immediately updates the configurations of the internal signal processor. May be called multiple times after the initialization and during processing.

Trait Implementations

impl Clone for Processor[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.