[−][src]Struct webrtc_audio_processing::Processor
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]
&mut self,
frame: &mut Vec<Vec<f32>>
) -> Result<(), Error>
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]
&mut self,
frame: &mut Vec<Vec<f32>>
) -> Result<(), Error>
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
Auto Trait Implementations
impl RefUnwindSafe for Processor
impl Send for Processor
impl Sync for Processor
impl Unpin for Processor
impl UnwindSafe for Processor
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
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>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,