pub struct Processor { /* private fields */ }
Expand description

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

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.

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.

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.

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.

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.

Returns statistics from the last process_capture_frame() call.

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

Signals the AEC and AGC that the audio output will be / is muted. They may use the hint to improve their parameter adaptation.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.

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

🔬 This is a nightly-only experimental API. (toowned_clone_into)

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

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.