audio_codec/
telephone_event.rs1use super::{Decoder, Encoder, PcmBuf, Sample};
2
3#[derive(Default)]
4pub struct TelephoneEventDecoder {}
5
6impl TelephoneEventDecoder {
7 pub fn new() -> Self {
8 Self {}
9 }
10}
11
12impl Decoder for TelephoneEventDecoder {
13 fn decode(&mut self, _samples: &[u8]) -> PcmBuf {
14 vec![]
15 }
16
17 fn sample_rate(&self) -> u32 {
18 8000
19 }
20
21 fn channels(&self) -> u16 {
22 1
23 }
24}
25
26#[derive(Default)]
27pub struct TelephoneEventEncoder {}
28
29impl TelephoneEventEncoder {
30 pub fn new() -> Self {
31 Self {}
32 }
33}
34
35impl Encoder for TelephoneEventEncoder {
36 fn encode(&mut self, _samples: &[Sample]) -> Vec<u8> {
37 vec![]
38 }
39
40 fn sample_rate(&self) -> u32 {
41 8000
42 }
43
44 fn channels(&self) -> u16 {
45 1
46 }
47}