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