Function dsp::slice::from_frame_slice
[−]
[src]
pub fn from_frame_slice<'a, T, F>(slice: &'a [F]) -> T where F: Frame, T: FromFrameSlice<'a, F>
Converts the given slice of Frame
s into some slice T
.
This is a convenience function that wraps the FromFrameSlice
trait.
Examples
extern crate sample; fn main() { let foo = &[[0.0, 0.5], [0.0, -0.5]][..]; let bar: &[f32] = sample::slice::from_frame_slice(foo); assert_eq!(bar, &[0.0, 0.5, 0.0, -0.5][..]); }