![]() |
DDraceNetwork Documentation
|
#include <sound.h>
Public Member Functions | |
| int | Init () override REQUIRES(!m_SoundLock) |
| int | Update () override |
| void | Shutdown () override REQUIRES(!m_SoundLock) |
| bool | IsSoundEnabled () override |
| int | LoadOpus (const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock) |
| int | LoadWV (const char *pFilename, int StorageType=IStorage::TYPE_ALL) override REQUIRES(!m_SoundLock) |
| int | LoadOpusFromMem (const void *pData, unsigned DataSize, bool ForceLoad, const char *pContextName) override REQUIRES(!m_SoundLock) |
| int | LoadWVFromMem (const void *pData, unsigned DataSize, bool ForceLoad, const char *pContextName) override REQUIRES(!m_SoundLock) |
| void | UnloadSample (int SampleId) override REQUIRES(!m_SoundLock) |
| float | GetSampleTotalTime (int SampleId) override REQUIRES(!m_SoundLock) |
| float | GetSampleCurrentTime (int SampleId) override REQUIRES(!m_SoundLock) |
| void | SetSampleCurrentTime (int SampleId, float Time) override REQUIRES(!m_SoundLock) |
| void | SetChannel (int ChannelId, float Vol, float Pan) override REQUIRES(!m_SoundLock) |
| void | SetListenerPosition (vec2 Position) override |
| void | SetVoiceVolume (CVoiceHandle Voice, float Volume) override REQUIRES(!m_SoundLock) |
| void | SetVoiceFalloff (CVoiceHandle Voice, float Falloff) override REQUIRES(!m_SoundLock) |
| void | SetVoicePosition (CVoiceHandle Voice, vec2 Position) override REQUIRES(!m_SoundLock) |
| void | SetVoiceTimeOffset (CVoiceHandle Voice, float TimeOffset) override REQUIRES(!m_SoundLock) |
| void | SetVoiceCircle (CVoiceHandle Voice, float Radius) override REQUIRES(!m_SoundLock) |
| void | SetVoiceRectangle (CVoiceHandle Voice, float Width, float Height) override REQUIRES(!m_SoundLock) |
| CVoiceHandle | Play (int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) REQUIRES(!m_SoundLock) |
| CVoiceHandle | PlayAt (int ChannelId, int SampleId, int Flags, float Volume, vec2 Position) override REQUIRES(!m_SoundLock) |
| CVoiceHandle | Play (int ChannelId, int SampleId, int Flags, float Volume) override REQUIRES(!m_SoundLock) |
| void | Pause (int SampleId) override REQUIRES(!m_SoundLock) |
| void | Stop (int SampleId) override REQUIRES(!m_SoundLock) |
| void | StopAll () override REQUIRES(!m_SoundLock) |
| void | StopVoice (CVoiceHandle Voice) override REQUIRES(!m_SoundLock) |
| bool | IsPlaying (int SampleId) override REQUIRES(!m_SoundLock) |
| int | MixingRate () const override |
| void | Mix (short *pFinalOut, unsigned Frames) override REQUIRES(!m_SoundLock) |
| void | PauseAudioDevice () override |
| void | UnpauseAudioDevice () override |
| Public Member Functions inherited from IInterface | |
| IInterface () | |
| virtual | ~IInterface ()=default |
Private Types | |
| enum | { NUM_SAMPLES = 512 , NUM_VOICES = 256 , NUM_CHANNELS = 16 } |
Private Member Functions | |
| CSample m_aSamples[NUM_SAMPLES] | GUARDED_BY (m_SoundLock) |
| int m_FirstFreeSampleIndex | GUARDED_BY (m_SoundLock)=0 |
| CVoice m_aVoices[NUM_VOICES] | GUARDED_BY (m_SoundLock) |
| CChannel m_aChannels[NUM_CHANNELS] | GUARDED_BY (m_SoundLock) |
| int m_NextVoice | GUARDED_BY (m_SoundLock)=0 |
| CSample * | AllocSample () REQUIRES(!m_SoundLock) |
| void | RateConvert (CSample &Sample) const |
| bool | DecodeOpus (CSample &Sample, const void *pData, unsigned DataSize, const char *pContextName) const |
| bool | DecodeWV (CSample &Sample, const void *pData, unsigned DataSize, const char *pContextName) const |
| void | UpdateVolume () |
Private Attributes | |
| bool | m_SoundEnabled = false |
| SDL_AudioDeviceID | m_Device = 0 |
| CLock | m_SoundLock |
| uint32_t | m_MaxFrames = 0 |
| std::atomic< float > | m_ListenerPositionX = 0.0f |
| std::atomic< float > | m_ListenerPositionY = 0.0f |
| std::atomic< int > | m_SoundVolume = 100 |
| int | m_MixingRate = 48000 |
| class IEngineGraphics * | m_pGraphics = nullptr |
| IStorage * | m_pStorage = nullptr |
| int * | m_pMixBuffer = nullptr |
Additional Inherited Members | |
| Public Types inherited from ISound | |
| enum | { FLAG_LOOP = 1 << 0 , FLAG_POS = 1 << 1 , FLAG_NO_PANNING = 1 << 2 , FLAG_PREVIEW = 1 << 3 , FLAG_ALL = FLAG_LOOP | FLAG_POS | FLAG_NO_PANNING | FLAG_PREVIEW } |
| enum | { SHAPE_CIRCLE , SHAPE_RECTANGLE } |
| Protected Member Functions inherited from ISound | |
| CVoiceHandle | CreateVoiceHandle (int Index, int Age) |
| Protected Member Functions inherited from IInterface | |
| IKernel * | Kernel () |
|
private |
|
private |
|
private |
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
private |
|
private |
|
private |
|
privatepure virtual |
|
privatepure virtual |
|
overridevirtual |
Implements IEngineSound.
|
overridevirtual |
Implements ISound.
|
inlineoverridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
inlineoverridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
| ISound::CVoiceHandle CSound::Play | ( | int | ChannelId, |
| int | SampleId, | ||
| int | Flags, | ||
| float | Volume, | ||
| vec2 | Position ) |
|
overridevirtual |
Implements ISound.
|
private |
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements IEngineSound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements ISound.
|
overridevirtual |
Implements IEngineSound.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |