blob: 65fd2084f66783db4db970a6c3e884cd3b0ca922 (
plain)
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
|
//! Frame utilities
/// A `Frame` is a collection of samples which have a a specific
/// layout represented by `ChannelLayout`
pub trait Frame {}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
/// A monaural frame.
pub struct MonoFrame<T> {
/// Mono channel
pub m: T,
}
impl<T> Frame for MonoFrame<T> {}
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
/// A stereo frame.
pub struct StereoFrame<T> {
/// Left channel
pub l: T,
/// Right channel
pub r: T,
}
impl<T> Frame for StereoFrame<T> {}
|