pub fn to_boxed_sample_slice<T, S>(slice: T) -> Box<[S]>where
S: Sample,
T: ToBoxedSampleSlice<S>,Expand description
Converts the given boxed slice into a boxed slice of Samples.
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]);
}