AudioDecoderACM.h
上传用户:tuheem
上传日期:2007-05-01
资源大小:21889k
文件大小:2k
- /**************************************************************************************
- * *
- * *
- **************************************************************************************/
- #ifndef AUDIO_DECODER_ACM_H
- #define AUDIO_DECODER_ACM_H
- #include "MediaClasses.h"
- #include "RingBuffer.h"
- /*
- * ACM封装器类
- *
- */
- #include <mmsystem.h>
- #include <memory.h>
- #include <stdlib.h>
- #include <stdio.h>
- #include <mmreg.h>
- #include <msacm.h>
- class MediaAudioDecoderACM : public MediaItemAudioDecoder {
- private:
- MediaItemDecaps *decaps;
- HACMSTREAM hacm;
- ACMSTREAMHEADER acmHeader;
- DWORD acm;
- DWORD acmLeft;
- DWORD acmInLeft;
- DWORD outputSize;
- DWORD inputSize;
- WAVEFORMATEX *oFormat;
- char *in_buffer;
- char *out_buffer;
- MediaRingBuffer *ring;
- public:
- MediaAudioDecoderACM();
- ~MediaAudioDecoderACM();
- /*
- * 媒体项函数(MediaItem Funcs)
- */
- 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