Files
Client/GameTools/SoundLib/SoundBuffer.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

65 lines
2.1 KiB
C++

#ifndef _SoundBuffer_H_
#define _SoundBuffer_H_
#include "SoundObject.h"
#include "SoundGlobal.h"
#include "STL.h"
/////////////////////////////////////////////////////////////////////////////////////////
//
class CSoundBuffer : public ISoundObject
{
protected:
IDirectSoundBuffer8 * m_pDSBuffer8;
IDirectSoundBuffer ** m_apDSBuffer;
IDirectSound3DBuffer** m_ap3DBuffer;
ISoundFile * m_pSoundFile;
DWORD m_dwDSBufferSize;
DWORD m_dwNumBuffers;
private:
CSoundBuffer( const CSoundBuffer & ); //사용하지 못하도록 막아놨음.
CSoundBuffer & operator=( const CSoundBuffer & );
protected:
bool Restore( IDirectSoundBuffer* );
void FillBufferWithSound( IDirectSoundBuffer * );
IDirectSound3DBuffer * Get3DBufferInterface( DWORD dwIndex );
int GetFreeBuffer();
public:
CSoundBuffer();
CSoundBuffer( IDirectSound8 *, ISoundFile *, bool b3DSound, DWORD dwNumBuffers = 10 );
CSoundBuffer( IDirectSound8 *, const char *, bool b3DSound, DWORD dwNumBuffers = 10 );
virtual ~CSoundBuffer();
virtual void Create( IDirectSound8 *, ISoundFile *, bool b3DSound, DWORD dwNumBuffers = 10, DWORD dwAddFlag = 0 );
virtual void Create( IDirectSound8 *, const char *, bool b3DSound, DWORD dwNumBuffers = 10, DWORD dwAddFlag = 0 );
virtual void Destroy();
virtual int Play( bool bLoop );
virtual void Play( DWORD dwIndex, bool bLoop );
virtual void Stop( unsigned );
virtual void StopAll();
virtual void Reset( unsigned );
virtual void ResetAll();
virtual HANDLE GetEventNotify() { return 0; }
virtual void HandleNotification() {}
virtual bool IsAllPlaying();
virtual bool IsAllFree();
virtual bool IsPlaying( unsigned );
virtual DWORD GetMemoryUse();
virtual bool IsSameFile( const char * );
virtual const char * GetFilename();
virtual eSndObjType GetType() { return SNDOBJTYPE_SOUNDBUFFER; }
void SetPosition( DWORD dwIndex, D3DVALUE x, D3DVALUE y, D3DVALUE z );
void SetDistance( DWORD dwIndex, D3DVALUE minDistance, D3DVALUE maxDistance );
};
/////////////////////////////////////////////////////////////////////////////////////////
#endif