AudioDecoderMP3.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:1k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef AUDIO_DECODER_MP3_H
- #define AUDIO_DECODER_MP3_H
- #include "MediaClasses.h"
- #include "mp3/mpglib.h"
- #include "mp3/ring.h"
- #define MP3_INPUT_BUFFER_SIZE 2048
- class MediaAudioDecoderMP3 : public MediaItemAudioDecoder {
- private:
- MediaItemDecaps *decaps;
- WAVEFORMATEX *oFormat;
- char *in_buffer;
- char *out_buffer;
-
- struct mpstr mp;
- int last_result;
- int real_size;
- int DecompressMp3(char *outmemory, int outmemsize, int *done);
- public:
- MediaAudioDecoderMP3();
- ~MediaAudioDecoderMP3();
- media_type_t GetType();
- char *GetName();
-
- MP_RESULT Connect(MediaItem *item);
- MP_RESULT ReleaseConnections();
- DWORD GetCaps();
- MP_RESULT Configure(HINSTANCE hInstance, HWND hwnd);
- WAVEFORMATEX *GetAudioFormat();
- MP_RESULT EmptyAudioBuffer();
- unsigned int Decompress(void *buffer, unsigned int size);
- };
- #endif