sipxmedialib  Version 3.3
MpAudioFileDecompress.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2006 SIPez LLC.
3 // Licensed to SIPfoundry under a Contributor Agreement.
4 //
5 // Copyright (C) 2004-2006 SIPfoundry Inc.
6 // Licensed by SIPfoundry under the LGPL license.
7 //
8 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
9 // Licensed to SIPfoundry under a Contributor Agreement.
10 //
11 // $$
13 
14 
15 #ifndef MP_AUDIO_FILE_DECOMPRESS_H
16 #define MP_AUDIO_FILE_DECOMPRESS_H
17 
18 // SYSTEM INCLUDES
19 #include <os/iostream>
20 // APPLICATION INCLUDES
21 #include "mp/MpAudioAbstract.h"
22 
23 /* =========================CLASS AbstractDecompressor=========================== */
24 
26 protected:
27  MpAudioAbstract &_dataSource; // The object to get raw bytes from
28  size_t readBytes(AudioByte *buff, size_t length);
29 public:
31  virtual ~AbstractDecompressor();
32  virtual size_t getSamples(AudioSample *, size_t) = 0;
33  virtual void minMaxSamplingRate(long *, long *, long *);
34  virtual void minMaxChannels(int *, int *, int *);
35 };
36 
37 /* ==========================CLASS DecompressPcm8Signed========================= */
38 
40 public:
42  //:Constructor
43  size_t getSamples(AudioSample * buffer, size_t length);
44  //:getSamples
45 };
46 
47 /* ==========================CLASS DecompressPcm8Unsigned======================= */
48 
50 {
51 public:
53  //:constructor
54  size_t getSamples(AudioSample * buffer, size_t length);
55  //: getSamples
56 };
57 
58 /* ==================== CLASS DecompressPcm16MsbSigned=========================== */
59 
61 public:
63  // constructor
64  size_t getSamples(AudioSample *buffer, size_t length);
65  // getSamples
66 };
67 
68 /* ==========================CLASS DecompressPcm16LsbSigned======================= */
69 
71 public:
72 
74  //: Constructor
75 
76  size_t getSamples(AudioSample *buffer, size_t length);
77 };
78 
79 /* ==========================CLASS DecompressG711MuLaw======================= */
80 
82 public:
84  size_t getSamples(AudioSample *buffer, size_t length);
85 };
86 
89 
90 /* ==========================CLASS DecompressG711ALaw======================= */
91 
93 private:
95 public:
97  size_t getSamples(AudioSample *buffer, size_t length);
98 };
99 
102 
103 #endif
Definition: MpAudioAbstract.h:30
Definition: MpAudioFileDecompress.h:81
Definition: MpAudioFileDecompress.h:49
size_t DecompressG711ALaw(MpAudioSample *buffer, size_t length)
Definition: MpAudioUtils.cpp:549
Definition: MpAudioFileDecompress.h:25
size_t readBytes(AudioByte *buff, size_t length)
Definition: MpAudioFileDecompress.cpp:29
virtual void minMaxChannels(int *, int *, int *)
Definition: MpAudioFileDecompress.cpp:39
AbstractDecompressor(MpAudioAbstract &a)
Definition: MpAudioFileDecompress.cpp:17
AudioByte MuLawEncode(AudioSample)
Definition: mpG711.cpp:60
Definition: MpAudioFileDecompress.h:60
Definition: MpAudioFileDecompress.h:70
virtual void minMaxSamplingRate(long *, long *, long *)
Definition: MpAudioFileDecompress.cpp:34
MpAudioAbstract & _dataSource
Definition: MpAudioFileDecompress.h:27
size_t DecompressG711MuLaw(MpAudioSample *buffer, size_t length)
Definition: MpAudioUtils.cpp:514
AudioSample ALawDecode(AudioByte)
Definition: mpG711.cpp:117
Definition: MpAudioFileDecompress.h:39
virtual ~AbstractDecompressor()
Definition: MpAudioFileDecompress.cpp:24
AudioSample MuLawDecode(AudioByte)
Definition: mpG711.cpp:72
static AudioSample * _decodeTable
Definition: MpAudioFileDecompress.h:94
Definition: MpAudioFileDecompress.h:92
unsigned char AudioByte
Definition: MpAudioAbstract.h:22
short AudioSample
Definition: MpAudioAbstract.h:21
virtual size_t getSamples(AudioSample *, size_t)=0
AudioByte ALawEncode(AudioSample)
Definition: mpG711.cpp:106