cSoundInterface.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.
- //
- //
- // cSoundInterface.h: interface for the cSoundInterface class.
- //
- //////////////////////////////////////////////////////////////////////
- #if !defined(AFX_CSOUNDINTERFACE_H__4ED24258_B172_4F98_86AD_DCA753E2E6E7__INCLUDED_)
- #define AFX_CSOUNDINTERFACE_H__4ED24258_B172_4F98_86AD_DCA753E2E6E7__INCLUDED_
- #if _MSC_VER > 1000
- #pragma once
- #endif // _MSC_VER > 1000
- #include <mmsystem.h>
- #include <dxerr8.h>
- #include <dsound.h>
- class cSoundInterface
- {
- protected:
- static LPDIRECTSOUND8 m_pDS;
- static LPDIRECTSOUNDBUFFER m_pDSBPrimary;
- public:
- void SetListernerPosition(float fX, float fY, float fZ);
- void Destroy();
- LPDIRECTSOUND8 GetDirectSound();
- cSoundInterface();
- HRESULT Initialize( HWND hWnd, DWORD dwCoopLevel, DWORD dwPrimaryChannels = 2, DWORD dwPrimaryFreq = 22050, DWORD dwPrimaryBitRate = 16);
- HRESULT SetPrimaryBufferFormat( DWORD dwPrimaryChannels, DWORD dwPrimaryFreq, DWORD dwPrimaryBitRate );
- virtual ~cSoundInterface();
- };
- #endif // !defined(AFX_CSOUNDINTERFACE_H__4ED24258_B172_4F98_86AD_DCA753E2E6E7__INCLUDED_)