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§
source§impl 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
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§
source§impl Clone for AudioProcessorSettings
impl Clone for AudioProcessorSettings
source§fn clone(&self) -> AudioProcessorSettings
fn clone(&self) -> AudioProcessorSettings
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moresource§impl Debug for AudioProcessorSettings
impl Debug for AudioProcessorSettings
source§impl Default for AudioProcessorSettings
impl Default for AudioProcessorSettings
source§impl From<AudioProcessorSettings> for AudioContext
impl From<AudioProcessorSettings> for AudioContext
source§fn from(value: AudioProcessorSettings) -> Self
fn from(value: AudioProcessorSettings) -> Self
Converts to this type from the input type.
source§impl PartialEq<AudioProcessorSettings> for AudioProcessorSettings
impl PartialEq<AudioProcessorSettings> for AudioProcessorSettings
source§fn eq(&self, other: &AudioProcessorSettings) -> bool
fn eq(&self, other: &AudioProcessorSettings) -> bool
This method tests for
self
and other
values to be equal, and is used
by ==
.