/* ========================================================================== * ÀÛ ¼º ÀÚ : À̼ø±Ô * ÀÛ ¼º ÀÏ : 2007.03.20 * ³» ¿ë : »ç¿îµå ½Ã½ºÅÛ * ÁÖÀÇ»çÇ× : *===========================================================================*/ #pragma once #ifdef MAP_EDITOR /// »ç¿îµå ½Ã½ºÅÛ class cSoundSystem { static cSoundSystem* mSingleton; public: cSoundSystem(); ~cSoundSystem(); /// ÃʱâÈ­ bool Init( NiWindowRef hwnd ); /// 2D »ç¿îµå NiAudioSource* Load2DSound( unsigned int index, const cString& pathName, bool streamed = false ); NiAudioSource* Get2DSound( unsigned int index ) const; bool Play2DSound( unsigned int index ); bool Stop2DSound( unsigned int index ); public: /// ´ÜÀÏü¸¦ ¸®ÅÏ static cSoundSystem* GetSingleton(); private: /// 2D »ç¿îµå ¸Ê typedef tHashMap c2DSoundMap; c2DSoundMap m2DSoundMap; }; inline NiAudioSource* cSoundSystem::Get2DSound( unsigned int index ) const { c2DSoundMap::cConstIterator i = m2DSoundMap.Find( index ); if( i != m2DSoundMap.End() ) return i->mSecond; else return 0; } inline cSoundSystem* cSoundSystem::GetSingleton() { return mSingleton; } #define SOUNDSYS cSoundSystem::GetSingleton() #endif /// MAP_EDITOR