Macro audio::dynamic [−][src]
Construct an audio buffer.
This is useful when testing.
Examples
let buf = audio::dynamic![[0; 64]; 2]; let mut expected = vec![0; 64]; assert_eq!(&buf[0], &expected[..]); assert_eq!(&buf[1], &expected[..]);
Calling the macro with a template channel.
let buf = audio::dynamic![[0, 1, 2, 3]; 2]; assert_eq!(&buf[0], &[0, 1, 2, 3]); assert_eq!(&buf[1], &[0, 1, 2, 3]);
Using an exact topology of channels.
let buf = audio::dynamic![[0, 1, 2, 3], [4, 5, 6, 7]]; assert_eq!(&buf[0], &[0, 1, 2, 3]); assert_eq!(&buf[1], &[4, 5, 6, 7]);