pub struct AudioResamplerBuilder { /* private fields */ }
Expand description
Builder for the audio resampler.
Implementations§
source§impl AudioResamplerBuilder
impl AudioResamplerBuilder
sourcepub fn source_channel_layout(self, channel_layout: ChannelLayout) -> Self
pub fn source_channel_layout(self, channel_layout: ChannelLayout) -> Self
Set source channel layout.
sourcepub fn source_sample_format(self, sample_format: SampleFormat) -> Self
pub fn source_sample_format(self, sample_format: SampleFormat) -> Self
Set source sample format.
sourcepub fn source_sample_rate(self, sample_rate: u32) -> Self
pub fn source_sample_rate(self, sample_rate: u32) -> Self
Set source sample rate.
sourcepub fn target_channel_layout(self, channel_layout: ChannelLayout) -> Self
pub fn target_channel_layout(self, channel_layout: ChannelLayout) -> Self
Set target channel layout.
sourcepub fn target_sample_format(self, sample_format: SampleFormat) -> Self
pub fn target_sample_format(self, sample_format: SampleFormat) -> Self
Set target sample format.
sourcepub fn target_sample_rate(self, sample_rate: u32) -> Self
pub fn target_sample_rate(self, sample_rate: u32) -> Self
Set target sample rate.
sourcepub fn target_frame_samples(self, samples: Option<usize>) -> Self
pub fn target_frame_samples(self, samples: Option<usize>) -> Self
Set the expected number of samples in target frames (for fixed frame size codecs).
sourcepub fn build(self) -> Result<AudioResampler, Error>
pub fn build(self) -> Result<AudioResampler, Error>
Build the resampler.