Function dsp::slice::from_frame_slice_mut [] [src]

pub fn from_frame_slice_mut<'a, T, F>(slice: &'a mut [F]) -> T where F: Frame, T: FromFrameSliceMut<'a, F>

Converts the given slice of mutable Frames into some mutable slice T.

This is a convenience function that wraps the FromFrameSliceMut trait.

Examples

extern crate sample;

fn main() {
    let foo = &mut [[0.0, 0.5], [0.0, -0.5]][..];
    let bar: &mut [f32] = sample::slice::from_frame_slice_mut(foo);
    assert_eq!(bar, &mut [0.0, 0.5, 0.0, -0.5][..]);
}