[−][src]Function dasp_slice::to_sample_slice_mut
pub fn to_sample_slice_mut<'a, T, S>(slice: T) -> &'a mut [S] where
S: Sample,
T: ToSampleSliceMut<'a, S>,
Converts the given mutable slice of Frame
s into a mutable slice of Sample
s.
This is a convenience function that wraps the ToSampleSliceMut
trait.
Examples
fn main() { let foo = &mut [[0.0, 0.5], [0.0, -0.5]][..]; let bar = dasp_slice::to_sample_slice_mut(foo); assert_eq!(bar, &mut [0.0, 0.5, 0.0, -0.5][..]); }