[−][src]Struct bae_rs::utils::mono_resampler::MonoResampler
Struct tracking all of the data required for resampling, with some extra features like playback speed and looping.
Methods
impl MonoResampler
[src]
pub fn new(
data: TrackT,
source_sample_rate: MathT,
loop_start: usize,
loop_end: usize
) -> Self
[src]
data: TrackT,
source_sample_rate: MathT,
loop_start: usize,
loop_end: usize
) -> Self
Creates a new MonoResampler object.
Parameters
data
- The track containing the original audio data to resample.source_sample_rate
- The sample rate the original data was recorded at.loop_start
- The start point of looping.loop_end
- The end point of looping. If this value is 0, no looping is assumed.
If loop_end
is less than loop_start
, they are swapped.
pub fn set_playback_speed(&mut self, speed: MathT)
[src]
Sets the playback speed.
pub fn get_playback_speed(&self) -> MathT
[src]
Returns the playback speed.
pub fn process(&mut self) -> SampleT
[src]
Calculates and returns the next sample.
Trait Implementations
impl Clone for MonoResampler
[src]
fn clone(&self) -> Self
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
Auto Trait Implementations
impl RefUnwindSafe for MonoResampler
impl Send for MonoResampler
impl Sync for MonoResampler
impl Unpin for MonoResampler
impl UnwindSafe for MonoResampler
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T
[src]
fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,