MEDIA.H
上传用户:lianyisd
上传日期:2019-11-03
资源大小:5188k
文件大小:1k
- // Media.h: interface for the CSound class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_SOUND_H__59E8E868_01DA_4F40_9558_91F04464950F__INCLUDED_)
- #define AFX_SOUND_H__59E8E868_01DA_4F40_9558_91F04464950F__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- enum PLAYTYPE
- {
- MIDI,
- WAVE,
- CD,
- AVI,
- NONE
- };
- class CMedia : public CObject
- {
- public:
- DWORD Seek(int nMiniute,int nSecond);
- DWORD CloseCDRom(); //开光驱门
- DWORD OpenCDRom(); //关光驱门
- DWORD SaveRecord(LPCSTR pFilename); //存储录音
- DWORD BeginRecord(); //开始录音
- DWORD Pause(); //暂停
- DWORD CloseDevice(); //关闭设备
- DWORD Stop(); //停止
- DWORD Play(CWnd* pWnd,LPCSTR pFileName); //播放
- DWORD OpenDevice(LPCSTR pFileName,LPCSTR pFileExt); //打开设备
- void DisplayErrorMsg(DWORD dwError); //显示出错信息
- bool closed;
- bool paused;
- bool stopped;
- PLAYTYPE type;
- DWORD dwResult;
- MCI_SEEK_PARMS mciSeekParms;
- MCI_GENERIC_PARMS mciStopParms;
- MCI_SAVE_PARMS mciSaveParms;
- MCI_RECORD_PARMS mciRecordParms;
- MCI_GENERIC_PARMS mciGenericParms;
- MCI_STATUS_PARMS mciStatusParms;
- MCI_OPEN_PARMS mciOpenParms;
- MCI_PLAY_PARMS mciPlayParms;
- CMedia();
- virtual ~CMedia();
- protected:
- MCIDEVICEID m_nDeviceID;
- };
- #endif // !defined(AFX_SOUND_H__59E8E868_01DA_4F40_9558_91F04464950F__INCLUDED_)