cSound.h
上传用户:sycq158
上传日期:2008-10-22
资源大小:15361k
文件大小:1k
- // CMAIN LIB - APPLICATION AND DIRECT WRAPPER
- //
- // Written by Mauricio Teichmann Ritter
- //
- // Copyright (C) 2002, Brazil. All rights reserved.
- //
- //
- // cSound.h: interface for the cSound class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CSOUND_H__CB9EB4C7_823F_4433_8A55_F48CA18BA884__INCLUDED_)
- #define AFX_CSOUND_H__CB9EB4C7_823F_4433_8A55_F48CA18BA884__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include "cwavfile.h"
- #include "csoundinterface.h"
- #include <dxerr8.h>
- #include <dsound.h>
- class cSound
- {
- private:
- DWORD m_dwDSBufferSize;
- cWavFile* m_pWaveFile;
- public:
- void Destroy();
- void SetVelocity(float fX, float fY, float fZ);
- void SetPosition(float fX, float fY, float fZ);
- LPTSTR m_sFileName;
- HRESULT Stop(BOOL bOverride = FALSE);
- BOOL m_bIsPlaying;
-
- LPDIRECTSOUND3DBUFFER Get3DInterface();
- HRESULT RestoreBuffer(BOOL *bRestored);
- HRESULT Play(DWORD dwPriority = 0, DWORD dwFlags = 0);
- LPDIRECTSOUNDBUFFER m_pSoundBuffer;
- LPDIRECTSOUND3DBUFFER m_p3DInterface;
- HRESULT Create(LPTSTR lpszFileName, DWORD dwCreationFlags, GUID guid3DAlgorithm);
- cSound();
- virtual ~cSound();
- protected:
- HRESULT FillBuffer();
- };
- #endif // !defined(AFX_CSOUND_H__CB9EB4C7_823F_4433_8A55_F48CA18BA884__INCLUDED_)