3#ifndef GAME_CLIENT_COMPONENTS_SOUNDS_H
4#define GAME_CLIENT_COMPONENTS_SOUNDS_H
56 virtual int Sizeof()
const override {
return sizeof(*this); }
57 virtual void OnInit()
override;
58 virtual void OnReset()
override;
59 virtual void OnStateChange(
int NewState,
int OldState)
override;
63 void Enqueue(
int Channel,
int SetId);
64 void Play(
int Channel,
int SetId,
float Volume);
65 void PlayAt(
int Channel,
int SetId,
float Volume,
vec2 Position);
Definition: component.h:20
Definition: gameclient.h:124
CGameClient * m_pGameClient
Definition: sounds.h:13
void Run() override
Definition: sounds.cpp:22
CSoundLoading(CGameClient *pGameClient, bool Render)
Definition: sounds.cpp:15
bool m_Render
Definition: sounds.h:14
std::shared_ptr< CSoundLoading > m_pSoundJob
Definition: sounds.h:34
virtual void OnInit() override
Definition: sounds.cpp:100
float m_GameSoundVolume
Definition: sounds.h:41
float m_MapSoundVolume
Definition: sounds.h:42
void Stop(int SetId)
Definition: sounds.cpp:205
void PlayAndRecord(int Channel, int SetId, float Volume, vec2 Position)
Definition: sounds.cpp:183
@ CHN_GUI
Definition: sounds.h:49
@ CHN_WORLD
Definition: sounds.h:51
@ CHN_GLOBAL
Definition: sounds.h:52
@ CHN_MUSIC
Definition: sounds.h:50
@ CHN_MAPSOUND
Definition: sounds.h:53
void UpdateChannels()
Definition: sounds.cpp:46
@ QUEUE_SIZE
Definition: sounds.h:25
void Play(int Channel, int SetId, float Volume)
Definition: sounds.cpp:195
float m_GuiSoundVolume
Definition: sounds.h:40
virtual void OnRender() override
Definition: sounds.cpp:135
bool IsPlaying(int SetId)
Definition: sounds.cpp:216
ISound::CVoiceHandle PlaySample(int Channel, int SampleId, int Flags, float Volume)
Definition: sounds.cpp:228
bool m_WaitForSoundJob
Definition: sounds.h:35
virtual void OnStateChange(int NewState, int OldState) override
Definition: sounds.cpp:129
int GetSampleId(int SetId)
Definition: sounds.cpp:78
void Enqueue(int Channel, int SetId)
Definition: sounds.cpp:170
float m_BackgroundMusicVolume
Definition: sounds.h:43
struct CSounds::QueueEntry m_aQueue[QUEUE_SIZE]
int64_t m_QueueWaitTime
Definition: sounds.h:33
ISound::CVoiceHandle PlaySampleAt(int Channel, int SampleId, int Flags, float Volume, vec2 Position)
Definition: sounds.cpp:239
virtual int Sizeof() const override
Definition: sounds.h:56
void PlayAt(int Channel, int SetId, float Volume, vec2 Position)
Definition: sounds.cpp:200
void ClearQueue()
Definition: sounds.cpp:163
int m_QueuePos
Definition: sounds.h:32
virtual void OnReset() override
Definition: sounds.cpp:120
int m_Channel
Definition: sounds.h:29
int m_SetId
Definition: sounds.h:30