SOUND.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
- #include <mmsystem.h>
- #pragma comment(lib, "winmm.lib")
- enum PLAYTYPE
- {
- MIDI,
- WAVE,
- CD,
- AVI
- };
- class CMedia : public CObject
- {
- public:
- bool closed;
- bool paused;
- MCI_GENERIC_PARMS mciStopParms;
- MCI_SAVE_PARMS mciSaveParms;
- DWORD SaveRecord(LPCSTR pFilename);
- MCI_RECORD_PARMS mciRecordParms;
- DWORD BeginRecord();
- PLAYTYPE type;
- MCI_GENERIC_PARMS mciGenericParms;
- bool stopped;
- MCI_STATUS_PARMS mciStatusParms;
- MCI_OPEN_PARMS mciOpenParms;
- DWORD dwResult;
- MCI_PLAY_PARMS mciPlayParms;
- DWORD Pause();
- DWORD CloseDevice();
- DWORD Stop();
- DWORD Play(CWnd* pWnd,LPCSTR pFileName);
- void DisplayErrorMsg(DWORD dwError);
- DWORD OpenDevice(LPCSTR pFileName,LPCSTR pFileExt);
- CMedia();
- virtual ~CMedia();
- protected:
- MCIDEVICEID m_nElementID;
- MCIDEVICEID m_nDeviceID;
- };
- #endif // !defined(AFX_SOUND_H__59E8E868_01DA_4F40_9558_91F04464950F__INCLUDED_)