pub fn dynamic<T>(value: T) -> Dynamic<T>Expand description
Wrap a Vec of Vecs or slice of Vecs where each inner Vec is a channel. The channels do not need to be equally sized.
This should only be used for external types which you have no control over or if you legitimately need a buffer which doesn’t have uniformly sized channels. Otherwise you should prefer to use Dynamic instead since it’s more memory efficient.
§Example
use audio::Buf;
let buf = vec![vec![1, 2, 3, 4], vec![5, 6]];
let buf = audio::wrap::dynamic(&buf[..]);
assert_eq!(buf.channels(), 2);
assert_eq!(buf.frames_hint(), Some(4));