00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00032 #ifndef __G711_H__
00033 #define __G711_H__
00034
00053 class G711
00054 {
00055 public:
00063 IMPORT static uint8_t ALawEncode(int16_t pcm16);
00064
00072 IMPORT static int ALawDecode(uint8_t alaw);
00073
00081 IMPORT static uint8_t ULawEncode(int16_t pcm16);
00082
00090 IMPORT static int ULawDecode(uint8_t ulaw);
00091
00099 IMPORT static uint8_t ALawToULaw(uint8_t alaw);
00100
00108 IMPORT static uint8_t ULawToALaw(uint8_t ulaw);
00109
00119 IMPORT static unsigned ALawEncode(uint8_t* dst, int16_t* src, size_t srcSize);
00120
00130 IMPORT static unsigned ALawDecode(int16_t* dst, const uint8_t* src, size_t srcSize);
00131
00141 IMPORT static unsigned ULawEncode(uint8_t* dst, int16_t* src, size_t srcSize);
00142
00152 IMPORT static unsigned ULawDecode(int16_t* dst, const uint8_t* src, size_t srcSize);
00153
00163 IMPORT static unsigned ALawToULaw(uint8_t* dst, const uint8_t* src, size_t srcSize);
00164
00174 IMPORT static unsigned ULawToALaw(uint8_t* dst, const uint8_t* src, size_t srcSize);
00175 };
00176
00178
00179 #endif
00180