soundlayer.h
来自「<B>DirectX9.0 3D游戏编程</B>」· C头文件 代码 · 共 51 行
H
51 行
/*******************************************************************
* Advanced 3D Game Programming using DirectX 9.0
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* copyright (c) 2003 by Peter A Walsh and Adrian Perez
* See license.txt for modification and distribution information
******************************************************************/
#ifndef _SOUNDLAYER_H
#define _SOUNDLAYER_H
#include <dsound.h>
#include "GameErrors.h" // Added by ClassView
class cSound;
class cSoundLayer
{
LPDIRECTSOUND8 m_pDSound;
LPDIRECTSOUNDBUFFER8 m_pPrimary; // primary mixer
static cSoundLayer* m_pGlobalSLayer;
cSoundLayer( HWND hWnd );
public:
virtual ~cSoundLayer();
static cSoundLayer* GetSound()
{
return m_pGlobalSLayer;
}
LPDIRECTSOUND8 GetDSound()
{
return m_pDSound;
}
static void Create( HWND hWnd )
{
new cSoundLayer( hWnd );
}
};
inline cSoundLayer* Sound()
{
return cSoundLayer::GetSound();
}
#endif //_SOUNDLAYER_H
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?