[−][src]Function dasp_slice::from_frame_slice
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
fn main() { let foo = &[[0.0, 0.5], [0.0, -0.5]][..]; let bar: &[f32] = dasp_slice::from_frame_slice(foo); assert_eq!(bar, &[0.0, 0.5, 0.0, -0.5][..]); }