sound.h

来自「3D游戏模板」· C头文件 代码 · 共 36 行

H
36
字号
/* sound system * Template CS game * (C)2002 Mat Sutcliffe. See license.txt for license info (GPL). */#ifndef __SOUND_H__#define __SOUND_H__#include <csutil/ref.h>#include <isound/renderer.h>#include <isound/source.h>#include <csutil/hashmap.h>#include <iutil/objreg.h>class Sound {	private:		csRef<iObjectRegistry> objreg;		csRef<iSoundRender> render;		csHashMap *handles;	public:		Sound(iObjectRegistry *);		~Sound();		csPtr<iSoundSource> GetSource(char *, int mode = SOUND3D_ABSOLUTE);	/* Return an iSoundSource which can be manipulated in 3D space and	 * played. The string given is looked up in the config and the	 * referenced sound file is used. For example:	 *	In config: Game.Sound.rocket1 = sound/rocket1.wav	 *	In code: sound->GetSource("rocket1");	 * Remeber to DecRef() the soundsource when finished with it.	 */};#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?