Music.h
资源名称:3DRPG.rar [点击查看]
上传用户:cjwanglu
上传日期:2013-07-10
资源大小:4744k
文件大小:1k
源码类别:
游戏
开发平台:
Visual C++
- #include <d3dx9.h>
- #include <dmusici.h>
- #include <dsound.h>
- #include <dshow.h>
- //#define SafeRRelease(pInterface) if(pInterface != NULL) {pInterface->Release(); pInterface=NULL;}
- class CMusic
- {
- private:
- WCHAR wstrSoundPath[MAX_PATH];
- CHAR strSoundPath[MAX_PATH];
- enum Format {Unknown, MP3, WavMidi};
- IDirectMusicSegment8* m_pSegment;
- IDirectMusicPerformance8* m_pDirectAudioPerformance;
- IDirectMusicLoader8* m_pDirectAudioLoader;
- IGraphBuilder* m_pGraph;
- IMediaControl* m_pMediaControl;
- IMediaPosition* m_pMediaPosition;
- Format m_enumFormat;
- public:
- CMusic(HWND hWnd);
- virtual ~CMusic();
- void Play(int t,LPSTR pStr);
- };