pub struct AudioProcessorSettings {
pub sample_rate: f32,
pub input_channels: usize,
pub output_channels: usize,
pub block_size: usize,
}
Expand description
Options provided to the audio-processor before calling process
.
Fields
sample_rate: f32
The sample rate of the signal
input_channels: usize
The number of input channels to the signal
output_channels: usize
The number of output channels to the signal
block_size: usize
Buffer size of this processing loop
Implementations
sourceimpl AudioProcessorSettings
impl AudioProcessorSettings
sourcepub fn new(
sample_rate: f32,
input_channels: usize,
output_channels: usize,
block_size: usize
) -> Self
pub fn new(
sample_rate: f32,
input_channels: usize,
output_channels: usize,
block_size: usize
) -> Self
Create audio processor settings with the given options
sourcepub fn sample_rate(&self) -> f32
pub fn sample_rate(&self) -> f32
The sample rate in samples/second as a floating point number
sourcepub fn input_channels(&self) -> usize
pub fn input_channels(&self) -> usize
The number of input channels
sourcepub fn output_channels(&self) -> usize
pub fn output_channels(&self) -> usize
The number of output channels
sourcepub fn block_size(&self) -> usize
pub fn block_size(&self) -> usize
The number of samples which will be provided on each process
call
sourceimpl AudioProcessorSettings
impl AudioProcessorSettings
sourcepub fn set_sample_rate(&mut self, sample_rate: f32)
pub fn set_sample_rate(&mut self, sample_rate: f32)
Set the sample rate of this settings object
sourcepub fn set_input_channels(&mut self, input_channels: usize)
pub fn set_input_channels(&mut self, input_channels: usize)
Set the number of input channels of this settings object
sourcepub fn set_output_channels(&mut self, output_channels: usize)
pub fn set_output_channels(&mut self, output_channels: usize)
Set the number of output channels of this settings object
sourcepub fn set_block_size(&mut self, block_size: usize)
pub fn set_block_size(&mut self, block_size: usize)
Set the buffer size of this settings object
Trait Implementations
sourceimpl Clone for AudioProcessorSettings
impl Clone for AudioProcessorSettings
sourcefn clone(&self) -> AudioProcessorSettings
fn clone(&self) -> AudioProcessorSettings
Returns a copy of the value. Read more
1.0.0 · sourceconst fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresourceimpl Debug for AudioProcessorSettings
impl Debug for AudioProcessorSettings
sourceimpl Default for AudioProcessorSettings
impl Default for AudioProcessorSettings
sourceimpl PartialEq<AudioProcessorSettings> for AudioProcessorSettings
impl PartialEq<AudioProcessorSettings> for AudioProcessorSettings
sourcefn eq(&self, other: &AudioProcessorSettings) -> bool
fn eq(&self, other: &AudioProcessorSettings) -> bool
impl Copy for AudioProcessorSettings
impl StructuralPartialEq for AudioProcessorSettings
Auto Trait Implementations
impl RefUnwindSafe for AudioProcessorSettings
impl Send for AudioProcessorSettings
impl Sync for AudioProcessorSettings
impl Unpin for AudioProcessorSettings
impl UnwindSafe for AudioProcessorSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more