Function dsp::slice::to_boxed_sample_slice
[−]
[src]
pub fn to_boxed_sample_slice<T, S>(slice: T) -> Box<[S]> where S: Sample, T: ToBoxedSampleSlice<S>
Converts the given boxed slice into a boxed slice of Sample
s.
This is a convenience function that wraps the ToBoxedSampleSlice
trait.
Examples
extern crate sample; fn main() { let foo = vec![[0.0, 0.5], [0.0, -0.5]].into_boxed_slice(); let bar = sample::slice::to_boxed_sample_slice(foo); assert_eq!(bar.into_vec(), vec![0.0, 0.5, 0.0, -0.5]); }