[][src]Struct bae_rs::utils::mono_resampler::MonoResampler

pub struct MonoResampler { /* fields omitted */ }

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]

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]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,