1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
use crateBuf;
/// Trait used to describe a buffer that knows exactly how many frames it has
/// regardless of if it's sized or not.
///
/// # Examples
///
/// ```
/// use audio::ExactSizeBuf;
///
/// fn test<T>(buf: T) where T: ExactSizeBuf {
/// assert_eq!(buf.frames(), 4);
/// }
///
/// test(audio::interleaved![[0i16; 4]; 4]);
/// test(audio::sequential![[0i16; 4]; 4]);
/// test(audio::dynamic![[0i16; 4]; 4]);
/// test(audio::wrap::interleaved([0i16; 16], 4));
/// test(audio::wrap::sequential([0i16; 16], 4));
/// ```