⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 code_decode.h

📁 源程序中包含PCMu率与PCM线形之间的编解码
💻 H
字号:
#ifndef _CODE_DECODE_H
#define _CODE_DECODE_H
 
#define ZEROTRAP    /* turn on the trap as per the MIL-STD */
#define BIAS 0x84   /* define the add-in bias for 16 bit samples */
#define CLIP 32635	//十六进制为 7F7B

#define	QUANT_MASK	(0xf)		/* Quantization field mask. */
#define	SEG_MASK	(0x70)		/* Segment field mask. */
#define	SEG_SHIFT	(4)		/* Left shift for segment number. */
#define	SIGN_BIT	(0x80)		/* Sign bit for a A-law byte. */

#define ERR_PARAM  -1
#define OK			   0
extern  unsigned char g_uc_ms_lin2ulaw[16384];
extern short int g_s_ms_ulaw2linear[256];

// for code_linear2u.c only
unsigned char linear2ulaw(short int sample);
short int ulaw2linear(unsigned char	u_val);

// for extern call
void ulawCreat();
inline int code_linear2ulaw(short int * SrcAddr,unsigned char * DstAddr,short int sample_NUM);

void linearCreat();
inline int code_ulaw2linear(unsigned char * pSrcData,short int * pDstData,short int sample_NUM);

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -