kolibrios/programs/media/ac97snd/trunk/mp3dec/mp3dec.h
heavyiron 3eda462807 Kernel: Smoothing image code from Mario79, build scripts for skin and drivers/build.bat
Programs: fasm updated to 1.67.14, small fixes in desktop, stackcfg, calc, board, pipes, freecell, big cleanup of unused programs, added some applications from 0.6.3.0 distr...

git-svn-id: svn://kolibrios.org@205 a494cfbc-eb01-0410-851d-a64ba20cac60
2006-11-02 14:18:23 +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