pub struct Resampler { /* private fields */ }Expand description
Sample-rate converter over interleaved f32 PCM.
Implementations§
Source§impl Resampler
impl Resampler
Sourcepub fn new(
input_rate: u32,
output_rate: u32,
channels: u32,
chunk_frames: usize,
) -> Result<Self, AudioError>
pub fn new( input_rate: u32, output_rate: u32, channels: u32, chunk_frames: usize, ) -> Result<Self, AudioError>
Build a resampler that converts from input_rate to output_rate
for the given channel count.
chunk_frames is rubato’s fixed input window size (per call to
the underlying resampler). The wrapper buffers caller input until
it has at least one chunk.
Auto Trait Implementations§
impl !RefUnwindSafe for Resampler
impl !Sync for Resampler
impl !UnwindSafe for Resampler
impl Freeze for Resampler
impl Send for Resampler
impl Unpin for Resampler
impl UnsafeUnpin for Resampler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more