Struct sampler::audio::wav::Audio [] [src]

pub struct Audio<F> {
    pub path: PathBuf,
    pub data: Box<[F]>,
    pub sample_hz: f64,
}

WAV data loaded into memory as a single contiguous slice of PCM frames.

Fields

Methods

impl<F> Audio<F> where
    F: Frame,
    F::Sample: Duplex<f64> + Duplex<i32>,
    Box<[F::Sample]>: ToBoxedFrameSlice<F>, 
[src]

Loads a Sample from the .wav file at the given path.

The PCM data retrieved from the file will be: - re-sized from its source bit rate to that of the target and - re-sampled upon loading (rather than at playback) to the given target sample rate for efficiency.

Trait Implementations

impl<F: Clone> Clone for Audio<F>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<F: Debug> Debug for Audio<F>
[src]

Formats the value using the given formatter.

impl<F: PartialEq> PartialEq for Audio<F>
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

impl<F> Audio for Audio<F> where
    F: Frame
[src]

The type of Frame data associated with the audio.

A reference to the slice of frames used to play the audio.