#ifndef _DirectSound_H_ #define _DirectSound_H_ #include "SoundGlobal.h" #include "STL.h" ///////////////////////////////////////////////////////////////////////////////////////// // ´ÙÀÌ·ºÆ® »ç¿îµå °´Ã¼ class CDirectSound { IDirectSound8 * m_pDSound; IDirectSound3DListener * m_p3DListener; bool m_bDSoundCreated; typedef std::vector SOUNDBUFFERLIST; SOUNDBUFFERLIST * m_pSoundBufferList; private: CDirectSound( const CDirectSound & ); //»ç¿ëÇÏÁö ¸øÇϵµ·Ï ¸·¾Æ³ùÀ½. CDirectSound & operator=( const CDirectSound & ); protected: IDirectSound3DListener * Get3DListenerInterface(); CDirectSound(); void SetPrimaryBufferFormat( DWORD, DWORD, DWORD ); public: static CDirectSound & GetInstance(); ~CDirectSound(); void Create( IDirectSound8 * ); void Create( HWND, DWORD, DWORD dwPrimaryChannels = 2, DWORD dwPrimaryFreq = 22050, DWORD dwPrimaryBitRate = 16 ); void Destroy(); void Enable3DSound(); //óÀ½¿¡´Â DisableµÈ »óÅÂÀÓ void SetDoppler( D3DVALUE distance, D3DVALUE doppler ); void SetRolloff( D3DVALUE rolloff ); void Set3DOrientation( D3DVALUE xFront, D3DVALUE yFront, D3DVALUE zFront , D3DVALUE xTop, D3DVALUE yTop, D3DVALUE zTop ); void SetVelocity( D3DVALUE x, D3DVALUE y, D3DVALUE z ); void SetPosition( D3DVALUE x, D3DVALUE y, D3DVALUE z ); void RegisterSoundBuffer( ISoundObject * ); //»ç¿îµå ¹öÆÛ¸¦ Á¦ ¶§¿¡ ÆÄ±«ÇØÁÖ±â À§ÇØ µî·ÏÀ» ÇÔ.(ÆÄ±«¿Í µ¿½Ã¿¡ ÇÒ´çµÆ´ø ¸Þ¸ð¸®¸¦ ¹ÝȯÇÔ) IDirectSound8 * GetDS() { return m_pDSound; } }; ///////////////////////////////////////////////////////////////////////////////////////// #endif