www.pudn.com > MyPlayerbylqh.rar > AudioDecoder.h


/************************************************************************************** 
 *                                                                                    * 
 *                                                                                    * 
 **************************************************************************************/ 
 
 
#ifndef AUDIO_DECODER_H 
#define AUDIO_DECODER_H 
 
#include "AudioDecoderMP3.h" 
#include "AudioDecoderACM.h" 
#include "MediaClasses.h" 
 
/* 
 * 声音解码封装类 
 */ 
class MediaAudioDecoder : public MediaItemAudioDecoder { 
 
private: 
 
	MediaAudioDecoderACM  *acmDecoder; 
	MediaAudioDecoderMP3  *mp3Decoder; 
	MediaItemAudioDecoder *decoder; 
 
public: 
 
	MediaAudioDecoder(); 
	~MediaAudioDecoder(); 
 
	/* 
	 * 媒体项函数 
	 */ 
	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