Nuclide
Software Development Kit for id Tech
|
SoundDef system functions. More...
Go to the source code of this file.
Classes | |
struct | snd_t |
A soundDef aka 'sound shader' type. More... | |
struct | sound_t |
A sound sample of a sentences.txt word sequence. More... | |
Macros | |
#define | SndLog(...) if (autocvar_s_developer) _SndLog(__FUNC__, sprintf(__VA_ARGS__)) |
Logs an sound system specific log message. More... | |
#define | SndEntLog(...) if (autocvar_s_developer) _SndEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__)) |
Logs an sound specific entity class log message. More... | |
Functions | |
void | _SndLog (string functionName, string msg) |
void | _SndEntLog (string className, string functionName, float edictNum, string warnMessage) |
void | Sound_Init (void) |
Called by the client inside CSQC_Init(), and on the server inside init(). More... | |
void | Sound_Shutdown (void) |
Called by CSQC_Shutdown() and in theory, somewhere on the server. More... | |
int | Sound_Precache (string sndDef) |
Force the precache of a soundDef file. More... | |
void | Sound_Play (entity targetEntity, int sndChannel, string sndDef) |
Play a soundDef on a given target entity. More... | |
void | Sound_PlayAt (vector worldPos, string sndDef) |
Play a soundDef a a given location. More... | |
void | Sound_PlayLocal (string shader) |
Client-side only: Play a sound locally, outside the game world. More... | |
void | Sound_Update (entity targetEntity, int sndChannel, int sndSample, float desiredVolume) |
Client-side only: Update the sound parameters on a given entity. More... | |
int | Sound_GetID (string sndDef) |
void | Sound_Stop (entity target, int chan) |
Stops sounds on a given channel, on a target entity. More... | |
void | Sound_DebugList () |
Called by listSoundDef. More... | |
Variables | |
float | maxspeed |
float | flags |
var bool | autocvar_s_developer = false |
var hashtable | g_hashsounds |
Global hash table for name > soundDef id lookup. More... | |
typedef | enumflags |
Enumeration of valid sound flags. More... | |
snd_t * | g_sounds |
Pointer to the global soundDef table. More... | |
int | g_sounds_count |
Total amount of registered soundDef entries. More... | |
SoundDef system functions.
Anything concerned with soundDef scripting happens here. They're the primary system with which you should be messing with the sound system. It allows modders to override/expand on the audio experience without having to edit the source code.
Read Sound: soundDef for more information.
#define SndEntLog | ( | ... | ) | if (autocvar_s_developer) _SndEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__)) |
Logs an sound specific entity class log message.
The console variable s_developer
has to be 1
for them to be visible.
description(...) | contains a formatted string containing a description. |
#define SndLog | ( | ... | ) | if (autocvar_s_developer) _SndLog(__FUNC__, sprintf(__VA_ARGS__)) |
Logs an sound system specific log message.
The console variable s_developer
has to be 1
for them to be visible.
description(...) | contains a formatted string containing a description. |
void Sound_DebugList | ( | ) |
Called by listSoundDef.
Called by the client inside CSQC_Init(), and on the server inside init().
Play a soundDef on a given target entity.
Client-side only: Play a sound locally, outside the game world.
Called by CSQC_Shutdown() and in theory, somewhere on the server.
Client-side only: Update the sound parameters on a given entity.
typedef enumflags |
Enumeration of valid sound flags.
forceloop don't random the samples no attenuation skip reverb volume on all channels is equal only play on target volume is calculated from entity speed sample follows entity as it plays this sounds alerts AI, takes distance into account
float flags |
var hashtable g_hashsounds |
Global hash table for name > soundDef id lookup.
snd_t* g_sounds |
Pointer to the global soundDef table.
int g_sounds_count |
Total amount of registered soundDef entries.
float maxspeed |