3#ifndef ENGINE_CLIENT_SOUND_H
4#define ENGINE_CLIENT_SOUND_H
100 bool DecodeWV(
CSample &Sample, const
void *pData,
unsigned DataSize) const;
int LoadOpus(const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:521
void Pause(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:894
int m_FirstFreeSampleIndex GUARDED_BY(m_SoundLock)=0
void RateConvert(CSample &Sample) const
Definition: sound.cpp:300
void Shutdown() override REQUIRES(!m_SoundLock)
Definition: sound.cpp:260
void SetVoiceVolume(CVoiceHandle Voice, float Volume) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:729
bool m_SoundEnabled
Definition: sound.h:72
void SetListenerPosition(vec2 Position) override
Definition: sound.cpp:723
void StopVoice(CVoiceHandle Voice) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:950
CLock m_SoundLock
Definition: sound.h:74
CSample * AllocSample() REQUIRES(!m_SoundLock)
Definition: sound.cpp:281
float GetSampleCurrentTime(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:677
void UnloadSample(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:635
void SetChannel(int ChannelId, float Vol, float Pan) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:714
CVoiceHandle PlayAt(int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:884
void SetVoicePosition(CVoiceHandle Voice, vec2 Position) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:759
@ NUM_VOICES
Definition: sound.h:68
@ NUM_CHANNELS
Definition: sound.h:69
@ NUM_SAMPLES
Definition: sound.h:67
bool IsPlaying(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:965
uint32_t m_MaxFrames
Definition: sound.h:82
bool DecodeOpus(CSample &Sample, const void *pData, unsigned DataSize) const
Definition: sound.cpp:336
CVoiceHandle Play(int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) REQUIRES(!m_SoundLock)
Definition: sound.cpp:838
int LoadOpusFromMem(const void *pData, unsigned DataSize, bool ForceLoad) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:595
class IEngineGraphics * m_pGraphics
Definition: sound.h:91
void Mix(short *pFinalOut, unsigned Frames) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:27
float GetSampleTotalTime(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:668
void PauseAudioDevice() override
Definition: sound.cpp:974
void Stop(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:912
void SetSampleCurrentTime(int SampleId, float Time) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:695
bool IsSoundEnabled() override
Definition: sound.h:109
int LoadWV(const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:558
int m_MixingRate
Definition: sound.h:89
int LoadWVFromMem(const void *pData, unsigned DataSize, bool ForceLoad) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:615
std::atomic< float > m_ListenerPositionY
Definition: sound.h:87
std::atomic< float > m_ListenerPositionX
Definition: sound.h:86
void SetVoiceTimeOffset(CVoiceHandle Voice, float TimeOffset) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:773
void StopAll() override REQUIRES(!m_SoundLock)
Definition: sound.cpp:933
int m_NextVoice GUARDED_BY(m_SoundLock)=0
CChannel m_aChannels[NUM_CHANNELS] GUARDED_BY(m_SoundLock)
int Init() override REQUIRES(!m_SoundLock)
Definition: sound.cpp:186
bool DecodeWV(CSample &Sample, const void *pData, unsigned DataSize) const
Definition: sound.cpp:440
void UnpauseAudioDevice() override
Definition: sound.cpp:979
int MixingRate() const override
Definition: sound.h:141
SDL_AudioDeviceID m_Device
Definition: sound.h:73
int Update() override
Definition: sound.cpp:246
void SetVoiceRectangle(CVoiceHandle Voice, float Width, float Height) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:822
void UpdateVolume()
Definition: sound.cpp:252
int * m_pMixBuffer
Definition: sound.h:94
std::atomic< int > m_SoundVolume
Definition: sound.h:88
void SetVoiceCircle(CVoiceHandle Voice, float Radius) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:807
CSample m_aSamples[NUM_SAMPLES] GUARDED_BY(m_SoundLock)
IStorage * m_pStorage
Definition: sound.h:92
CVoice m_aVoices[NUM_VOICES] GUARDED_BY(m_SoundLock)
void SetVoiceFalloff(CVoiceHandle Voice, float Falloff) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:744
Definition: graphics.h:487
@ TYPE_ALL
Definition: storage.h:26
#define REQUIRES(...)
Definition: lock.h:32
int m_Pan
Definition: sound.h:41
int m_Vol
Definition: sound.h:40
int m_PausedAt
Definition: sound.h:25
bool IsLoaded() const
Definition: sound.h:32
int m_Index
Definition: sound.h:16
int m_NumFrames
Definition: sound.h:20
int m_Channels
Definition: sound.h:22
int m_Rate
Definition: sound.h:21
short * m_pData
Definition: sound.h:19
float TotalTime() const
Definition: sound.h:27
int m_NextFreeSampleIndex
Definition: sound.h:17
int m_LoopStart
Definition: sound.h:23
int m_LoopEnd
Definition: sound.h:24
CSample * m_pSample
Definition: sound.h:46
ISound::CVoiceShapeRectangle m_Rectangle
Definition: sound.h:59
CChannel * m_pChannel
Definition: sound.h:47
int m_Vol
Definition: sound.h:50
int m_Flags
Definition: sound.h:51
int m_Age
Definition: sound.h:48
float m_Falloff
Definition: sound.h:53
ISound::CVoiceShapeCircle m_Circle
Definition: sound.h:58
int m_Tick
Definition: sound.h:49
vec2 m_Position
Definition: sound.h:52
int m_Shape
Definition: sound.h:55