Files
Client/GameTools/SoundLib/Sound3D.h
LGram16 dd97ddec92 Restructure repository to include all source folders
Move git root from Client/ to src/ to track all source code:
- Client: Game client source (moved to Client/Client/)
- Server: Game server source
- GameTools: Development tools
- CryptoSource: Encryption utilities
- database: Database scripts
- Script: Game scripts
- rylCoder_16.02.2008_src: Legacy coder tools
- GMFont, Game: Additional resources

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:17:20 +09:00

75 lines
2.2 KiB
C++

// Sound3D.h: interface for the CSound3D class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_SOUND3D_H__9100BA05_DC25_4ECD_A2A7_4E34F81982C6__INCLUDED_)
#define AFX_SOUND3D_H__9100BA05_DC25_4ECD_A2A7_4E34F81982C6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <dsound.h>
#include "EAXBuffer.h"
class CSound;
class CWaveLoader;
class CSoundManager;
class CSound3D
{
protected:
friend class CSoundManager;
CSound* m_pSound;
LPDIRECTSOUND3DBUFFER8* m_ppDS3DBuffer;
//CEAXBuffer m_EAXBuffer;
protected:
LPDIRECTSOUND3DBUFFER8 Get3DSoundBufferInterface( DWORD dwIndex );
public:
CSound3D();
virtual ~CSound3D();
bool Create( const char* strFileName, DWORD dwNumBuffers );
void Destroy();
void Play() { m_pSound->Play(); };
void Stop() { m_pSound->Stop(); };
void Reset() { m_pSound->Reset(); };
bool IsPlaying() { return m_pSound->IsPlaying(); };
inline DWORD GetAllBufferSize() { return m_pSound->GetAllBufferSize(); };
LPDIRECTSOUNDBUFFER GetFreeBuffer() { return m_pSound->GetFreeBuffer(); };
LPDIRECTSOUNDBUFFER GetBuffer( DWORD dwIndex ) { return m_pSound->GetBuffer( dwIndex ); };
inline void SetVolume( float fVol ) { m_pSound->SetVolume(fVol); };
void GetVolume( float& fVol ) { m_pSound->GetVolume(fVol); };
inline void SetLooping( bool bLoop ) { m_pSound->SetLooping(bLoop); };
inline bool IsLooping() { return m_pSound->IsLooping(); };
//3D Property
void SetPosition(D3DVECTOR& vPos);
void GetPosition(D3DVECTOR& vPos);
void SetVelocity(const D3DVECTOR& vVel);
void GetVelocity(D3DVECTOR& vVel);
void SetMaxDistance(float fMaxDist );
void GetMaxDistance(float& fMaxDist);
void SetMinDistance(float fMinDist);
void GetMinDistance(float& fMinDist);
void SetConeAngles(DWORD dwInside, DWORD dwOutside);
void GetConeAngles(DWORD& dwInside, DWORD& dwOutside);
void SetConeOrientation(D3DVECTOR& vOrientation);
void GetConeOrientation(D3DVECTOR& vOrientation);
void SetConeOutsideVolume(float fVolume);
void GetConeOutsideVolume(float& fVolume);
void SetMode(DWORD dwMode);
void GetMode(DWORD& dwMode);
};
#endif // !defined(AFX_SOUND3D_H__9100BA05_DC25_4ECD_A2A7_4E34F81982C6__INCLUDED_)