Struct speexdsp_resampler::speex::SpeexResamplerState
source · pub struct SpeexResamplerState {Show 24 fields
in_rate: u32,
out_rate: u32,
num_rate: u32,
den_rate: u32,
quality: u32,
nb_channels: u32,
filt_len: u32,
mem_alloc_size: u32,
buffer_size: u32,
int_advance: u32,
frac_advance: u32,
cutoff: f32,
oversample: u32,
initialised: u32,
started: u32,
last_sample: Vec<u32>,
samp_frac_num: Vec<u32>,
magic_samples: Vec<u32>,
mem: Vec<f32>,
sinc_table: Vec<f32>,
sinc_table_length: u32,
resampler_ptr: Option<fn(_: &mut SpeexResamplerState, _: u32, _: &[f32], _: &mut u32, _: &mut [f32], _: &mut u32) -> i32>,
in_stride: u32,
out_stride: u32,
}
Fields§
§in_rate: u32
§out_rate: u32
§num_rate: u32
§den_rate: u32
§quality: u32
§nb_channels: u32
§filt_len: u32
§mem_alloc_size: u32
§buffer_size: u32
§int_advance: u32
§frac_advance: u32
§cutoff: f32
§oversample: u32
§initialised: u32
§started: u32
§last_sample: Vec<u32>
§samp_frac_num: Vec<u32>
§magic_samples: Vec<u32>
§mem: Vec<f32>
§sinc_table: Vec<f32>
§sinc_table_length: u32
§resampler_ptr: Option<fn(_: &mut SpeexResamplerState, _: u32, _: &[f32], _: &mut u32, _: &mut [f32], _: &mut u32) -> i32>
§in_stride: u32
§out_stride: u32
Implementations§
source§impl SpeexResamplerState
impl SpeexResamplerState
pub fn new( nb_channels: usize, in_rate: usize, out_rate: usize, quality: usize, ) -> Self
pub fn init_frac( nb_channels: usize, ratio_num: usize, ratio_den: usize, in_rate: usize, out_rate: usize, quality: usize, ) -> Self
pub fn process_float( &mut self, channel_index: u32, in_0: &[f32], in_len: &mut u32, out: &mut [f32], out_len: &mut u32, ) -> usize
pub fn process_int( &mut self, channel_index: u32, in_0: &[i16], in_len: &mut u32, out: &mut [i16], out_len: &mut u32, ) -> usize
pub fn process_interleaved_float( &mut self, in_0: &[f32], in_len: &mut u32, out: &mut [f32], out_len: &mut u32, ) -> usize
pub fn process_interleaved_int( &mut self, in_0: &[i16], in_len: &mut u32, out: &mut [i16], out_len: &mut u32, ) -> usize
pub fn set_quality(&mut self, quality: usize) -> usize
pub fn set_rate(&mut self, in_rate: usize, out_rate: usize) -> usize
pub fn set_rate_frac( &mut self, ratio_num: usize, ratio_den: usize, in_rate: usize, out_rate: usize, ) -> usize
pub fn get_rate(&self) -> (usize, usize)
pub fn get_ratio(&self) -> (usize, usize)
pub fn get_quality(&self) -> usize
pub fn set_input_stride(&mut self, stride: usize)
pub fn get_input_stride(&mut self) -> usize
pub fn set_output_stride(&mut self, stride: usize)
pub fn get_output_stride(&mut self) -> usize
pub fn get_input_latency(&self) -> usize
pub fn get_output_latency(&self) -> usize
pub fn skip_zeros(&mut self)
pub fn reset_mem(&mut self)
fn num_den(&mut self)
fn use_direct(&mut self)
fn not_use_direct(&mut self)
fn chunks_iterator(&mut self, old_length: u32, alloc_size: usize, algo: usize)
fn update_filter(&mut self) -> usize
Trait Implementations§
source§impl Clone for SpeexResamplerState
impl Clone for SpeexResamplerState
source§fn clone(&self) -> SpeexResamplerState
fn clone(&self) -> SpeexResamplerState
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 moreAuto Trait Implementations§
impl Freeze for SpeexResamplerState
impl RefUnwindSafe for SpeexResamplerState
impl Send for SpeexResamplerState
impl Sync for SpeexResamplerState
impl Unpin for SpeexResamplerState
impl UnwindSafe for SpeexResamplerState
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)