Debian Codegraph @

third_party/rust/cubeb/src/frame.rs

raw
1 //! Frame utilities
2
3 /// A `Frame` is a collection of samples which have a a specific
4 /// layout represented by `ChannelLayout`
5 pub trait Frame {}
6
7 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
8 /// A monaural frame.
9 pub struct MonoFrame<T> {
10 /// Mono channel
11 pub m: T,
12 }
13
14 impl<T> Frame for MonoFrame<T> {}
15
16 #[derive(Clone, Copy, Debug, PartialEq, Eq)]
17 /// A stereo frame.
18 pub struct StereoFrame<T> {
19 /// Left channel
20 pub l: T,
21 /// Right channel
22 pub r: T,
23 }
24
25 impl<T> Frame for StereoFrame<T> {}