mpegsound_locals.h

来自「pixil 最新的嵌入linux 應用程序集,別的地方很難下載」· C头文件 代码 · 共 72 行

H
72
字号
/* MPEG/WAVE Sound library   (C) 1997 by Jung woo-jae */// Mpegsound_locals.h// It is used for compiling library#ifndef _L__SOUND_LOCALS__#define _L__SOUND_LOCALS__// Inline functionsinline intMpegtoraw::getbyte(void){    int r = (unsigned char) buffer[bitindex >> 3];    bitindex += 8;    return r;};inline intMpegtoraw::getbits9(int bits){    register unsigned short a;#ifndef WORDS_BIGENDIAN    {	int offset = bitindex >> 3;	a = (((unsigned char) buffer[offset]) << 8) | ((unsigned char)						       buffer[offset + 1]);    }#else    a = ((unsigned short *) (buffer + ((bixindex >> 3))));#endif    a <<= (bitindex & 7);    bitindex += bits;    return (int) ((unsigned int) (a >> (16 - bits)));};inline intMpegtoraw::getbits8(void){    register unsigned short a;#ifndef WORDS_BIGENDIAN    {	int offset = bitindex >> 3;	a = (((unsigned char) buffer[offset]) << 8) | ((unsigned char)						       buffer[offset + 1]);    }#else    a = ((unsigned short *) (buffer + ((bixindex >> 3))));#endif    a <<= (bitindex & 7);    bitindex += 8;    return (int) ((unsigned int) (a >> 8));};inline intMpegtoraw::getbit(void){    register int r = (buffer[bitindex >> 3] >> (7 - (bitindex & 7))) & 1;    bitindex++;    return r;};#endif

⌨️ 快捷键说明

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