3#ifndef ENGINE_CLIENT_SOUND_H
4#define ENGINE_CLIENT_SOUND_H
95 bool DecodeWV(
CSample &Sample,
const void *pData,
unsigned DataSize)
const;
116 void SetChannel(
int ChannelId,
float Vol,
float Pan)
override;
int LoadOpus(const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:511
void Pause(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:881
void RateConvert(CSample &Sample) const
Definition: sound.cpp:290
float GetSampleTotalTime(int SampleId) override
Definition: sound.cpp:657
void Shutdown() override REQUIRES(!m_SoundLock)
Definition: sound.cpp:259
void SetVoiceVolume(CVoiceHandle Voice, float Volume) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:714
int LoadWVFromMem(const void *pData, unsigned DataSize, bool FromEditor) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:614
bool m_SoundEnabled
Definition: sound.h:67
void SetListenerPosition(vec2 Position) override
Definition: sound.cpp:708
void StopVoice(CVoiceHandle Voice) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:931
CLock m_SoundLock
Definition: sound.h:69
float GetSampleCurrentTime(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:665
void SetChannel(int ChannelId, float Vol, float Pan) override
Definition: sound.cpp:702
int Init() override
Definition: sound.cpp:186
void UnloadSample(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:637
CVoiceHandle PlayAt(int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:871
void SetVoicePosition(CVoiceHandle Voice, vec2 Position) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:744
bool IsPlaying(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:946
uint32_t m_MaxFrames
Definition: sound.h:77
CVoice m_aVoices[NUM_VOICES]
Definition: sound.h:74
bool DecodeOpus(CSample &Sample, const void *pData, unsigned DataSize) const
Definition: sound.cpp:326
CVoiceHandle Play(int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) REQUIRES(!m_SoundLock)
Definition: sound.cpp:823
class IEngineGraphics * m_pGraphics
Definition: sound.h:86
void Mix(short *pFinalOut, unsigned Frames) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:27
void PauseAudioDevice() override
Definition: sound.cpp:953
void Stop(int SampleId) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:896
CChannel m_aChannels[NUM_CHANNELS]
Definition: sound.h:75
void SetSampleCurrentTime(int SampleId, float Time) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:683
CSample m_aSamples[NUM_SAMPLES]
Definition: sound.h:71
bool IsSoundEnabled() override
Definition: sound.h:104
int LoadWV(const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:551
int m_MixingRate
Definition: sound.h:84
std::atomic< float > m_ListenerPositionY
Definition: sound.h:82
std::atomic< float > m_ListenerPositionX
Definition: sound.h:81
int LoadOpusFromMem(const void *pData, unsigned DataSize, bool FromEditor) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:591
void SetVoiceTimeOffset(CVoiceHandle Voice, float TimeOffset) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:758
void StopAll() override REQUIRES(!m_SoundLock)
Definition: sound.cpp:914
CSample * AllocSample()
Definition: sound.cpp:272
int m_FirstFreeSampleIndex
Definition: sound.h:72
int m_NextVoice
Definition: sound.h:76
bool DecodeWV(CSample &Sample, const void *pData, unsigned DataSize) const
Definition: sound.cpp:430
void UnpauseAudioDevice() override
Definition: sound.cpp:958
int MixingRate() const override
Definition: sound.h:136
SDL_AudioDeviceID m_Device
Definition: sound.h:68
@ NUM_VOICES
Definition: sound.h:63
@ NUM_CHANNELS
Definition: sound.h:64
@ NUM_SAMPLES
Definition: sound.h:62
int Update() override
Definition: sound.cpp:245
void SetVoiceRectangle(CVoiceHandle Voice, float Width, float Height) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:807
void UpdateVolume()
Definition: sound.cpp:251
int * m_pMixBuffer
Definition: sound.h:89
std::atomic< int > m_SoundVolume
Definition: sound.h:83
void SetVoiceCircle(CVoiceHandle Voice, float Radius) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:792
IStorage * m_pStorage
Definition: sound.h:87
void SetVoiceFalloff(CVoiceHandle Voice, float Falloff) override REQUIRES(!m_SoundLock)
Definition: sound.cpp:729
Definition: graphics.h:501
@ TYPE_ALL
Definition: storage.h:26
#define REQUIRES(...)
Definition: lock.h:32
int m_Pan
Definition: sound.h:36
int m_Vol
Definition: sound.h:35
int m_PausedAt
Definition: sound.h:25
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:41
ISound::CVoiceShapeRectangle m_Rectangle
Definition: sound.h:54
CChannel * m_pChannel
Definition: sound.h:42
int m_Vol
Definition: sound.h:45
int m_Flags
Definition: sound.h:46
int m_Age
Definition: sound.h:43
float m_Falloff
Definition: sound.h:48
ISound::CVoiceShapeCircle m_Circle
Definition: sound.h:53
int m_Tick
Definition: sound.h:44
vec2 m_Position
Definition: sound.h:47
int m_Shape
Definition: sound.h:50