blob: 0c80973f2242856f3a2aa4beed311028b9c4c2da [file] [log] [blame]
Roman Khassraf059bab92015-05-20 12:49:46 +02001#ifndef _VOCODERFRAME_H
2#define _VOCODERFRAME_H
3
4#include "BitVector.h"
5//#include "GSMCommon.h"
6
7class VocoderFrame : public BitVector {
8
9 public:
10
11 VocoderFrame()
12 :BitVector(264)
13 { fillField(0,0x0d,4); }
14
15 /** Construct by unpacking a char[33]. */
16 VocoderFrame(const unsigned char *src)
17 :BitVector(264)
18 { unpack(src); }
19
20 BitVector payload() { return tail(4); }
21 const BitVector payload() const { return tail(4); }
22
23};
24
25class VocoderAMRFrame : public BitVector {
26
27 public:
28
29 VocoderAMRFrame()
30 :BitVector(244+8)
31 { fillField(0,0x3c,8); /* AMR-NB 12.2 */ }
32
33 /** Construct by unpacking a char[32]. */
34 VocoderAMRFrame(const unsigned char *src)
35 :BitVector(244+8)
36 { unpack(src); }
37
38 BitVector payload() { return tail(8); }
39 const BitVector payload() const { return tail(8); }
40
41};
42
43#endif