Files
Client/Engine/SoundLib/StreamingSound.h
LGram16 e067522598 Initial commit: ROW Client source code
Game client codebase including:
- CharacterActionControl: Character and creature management
- GlobalScript: Network, items, skills, quests, utilities
- RYLClient: Main client application with GUI and event handlers
- Engine: 3D rendering engine (RYLGL)
- MemoryManager: Custom memory allocation
- Library: Third-party dependencies (DirectX, boost, etc.)
- Tools: Development utilities

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:24:34 +09:00

60 lines
1.5 KiB
C++

// StreamingSound.h: interface for the CStreamingSound class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_STREAMINGSOUND_H__C14F203D_5328_480B_937C_55F88F36E678__INCLUDED_)
#define AFX_STREAMINGSOUND_H__C14F203D_5328_480B_937C_55F88F36E678__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#include <dsound.h>
#include "DefineSound.h"
class CSound;
class COggLoader;
class CStreamingSound
{
protected:
friend class CStreamingSound3D;
LPDIRECTSOUNDBUFFER8 m_pDSBuffer;
COggLoader* m_pOggFile;
DWORD m_dwDSBufferSize;
DWORD m_dwDataCursor;
DWORD m_dwBytesPlayed;
DWORD m_dwLastReadPos;
bool m_bPlaying;
bool m_bRemoveStream;
bool m_bLoop;
bool m_bSound3D;
float m_fVolume;
public:
CStreamingSound();
virtual ~CStreamingSound();
protected:
BYTE GetSilenceData();
void FillBuffer();
HRESULT RestoreBuffer( LPDIRECTSOUNDBUFFER pDSB, BOOL* pbWasRestored );
public:
bool Create( char* strFileName );
void Destroy();
void ServiceBuffer();
void Play();
void Stop();
HRESULT Reset();
inline bool IsPlaying() { return m_bPlaying; }
inline DWORD GetBufferSize() { return m_dwDSBufferSize; }
inline void SetLooping( bool bLoop ) { m_bLoop = bLoop; }
inline bool IsLooping() { return m_bLoop; }
void SetVolume( float fVol );
inline void GetVolume( float& fVol ) { fVol = m_fVolume; }
};
#endif // !defined(AFX_STREAMINGSOUND_H__C14F203D_5328_480B_937C_55F88F36E678__INCLUDED_)