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

source

pub fn new( nb_channels: usize, in_rate: usize, out_rate: usize, quality: usize, ) -> Self

source

pub fn init_frac( nb_channels: usize, ratio_num: usize, ratio_den: usize, in_rate: usize, out_rate: usize, quality: usize, ) -> Self

source

pub fn process_float( &mut self, channel_index: u32, in_0: &[f32], in_len: &mut u32, out: &mut [f32], out_len: &mut u32, ) -> usize

source

pub fn process_int( &mut self, channel_index: u32, in_0: &[i16], in_len: &mut u32, out: &mut [i16], out_len: &mut u32, ) -> usize

source

pub fn process_interleaved_float( &mut self, in_0: &[f32], in_len: &mut u32, out: &mut [f32], out_len: &mut u32, ) -> usize

source

pub fn process_interleaved_int( &mut self, in_0: &[i16], in_len: &mut u32, out: &mut [i16], out_len: &mut u32, ) -> usize

source

pub fn set_quality(&mut self, quality: usize) -> usize

source

pub fn set_rate(&mut self, in_rate: usize, out_rate: usize) -> usize

source

pub fn set_rate_frac( &mut self, ratio_num: usize, ratio_den: usize, in_rate: usize, out_rate: usize, ) -> usize

source

pub fn get_rate(&self) -> (usize, usize)

source

pub fn get_ratio(&self) -> (usize, usize)

source

pub fn get_quality(&self) -> usize

source

pub fn set_input_stride(&mut self, stride: usize)

source

pub fn get_input_stride(&mut self) -> usize

source

pub fn set_output_stride(&mut self, stride: usize)

source

pub fn get_output_stride(&mut self) -> usize

source

pub fn get_input_latency(&self) -> usize

source

pub fn get_output_latency(&self) -> usize

source

pub fn skip_zeros(&mut self)

source

pub fn reset_mem(&mut self)

source

fn num_den(&mut self)

source

fn use_direct(&mut self)

source

fn not_use_direct(&mut self)

source

fn chunks_iterator(&mut self, old_length: u32, alloc_size: usize, algo: usize)

source

fn update_filter(&mut self) -> usize

Trait Implementations§

source§

impl Clone for SpeexResamplerState

source§

fn clone(&self) -> SpeexResamplerState

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.