kolibrios/programs/media/ac97 mp3/trunk/mp3dec/mp3dec.h
Sergey Semyonov (Serge) 1634ac97c2 ac97_mp3 source code
git-svn-id: svn://kolibrios.org@165 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-10-06 06:20:41 +00:00

77 lines
1.9 KiB
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifdef __cplusplus
extern "C" {
#endif
#define MP3_ERROR_UNKNOWN 1
#define MP3_ERROR_INVALID_PARAMETER 2
#define MP3_ERROR_INVALID_SYNC 3
#define MP3_ERROR_INVALID_HEADER 4
#define MP3_ERROR_OUT_OF_BUFFER 5
typedef struct {
int version; //1:MPEG-1, 2:MPEG-2, 3:MPEG-2.5
int layer; //1:Layer1, 2:Layer2, 3:Layer3
int error_prot; //1:CRC on, 0:CRC off
int br_index;
int fr_index;
int padding;
int extension;
int mode;
int mode_ext;
int copyright;
int original;
int emphasis;
} MPEG_HEADER;
typedef struct {
int reduction;
int convert;
int freqLimit;
} MPEG_DECODE_OPTION;
typedef struct {
MPEG_HEADER header;
int channels; //出力チャネル
int bitsPerSample; //
int frequency; //サンプリングレートHz
int bitRate; //ビットレートbps
int frames; //フレーム数VBR only
int skipSize; //VBR only
int dataSize; //データサイズVBR only
int minInputSize; //1フレームの最小入力サイズ
int maxInputSize; //1フレームの最大入力サイズ
int outputSize; //1フレームの出力サイズ
} MPEG_DECODE_INFO;
typedef struct {
MPEG_HEADER header;
int bitRate; //ビットレートbps
void* inputBuf;
int inputSize;
void* outputBuf;
int outputSize;
} MPEG_DECODE_PARAM;
void mp3DecodeInit();
int mp3GetLastError();
int mp3SetDecodeOption(MPEG_DECODE_OPTION* option);
void mp3GetDecodeOption(MPEG_DECODE_OPTION* option);
int mp3SetEqualizer(int* value);
int mp3FindSync(void* buf, int size, int* sync);
int mp3GetDecodeInfo(void* mpeg, int size, MPEG_DECODE_INFO* info, int decFlag);
int mp3DecodeStart(void* buf, int size);
int mp3DecodeFrame(MPEG_DECODE_PARAM* param);
void mp3MuteStart(MPEG_DECODE_PARAM* param);
void mp3MuteEnd(MPEG_DECODE_PARAM* param);
double pow_test(double, double);
#ifdef __cplusplus
}
#endif