120 print(sprintf(
"^9%f ^xF50%s^7: %s\n", time, functionName, msg));
122 print(sprintf(
"^xF50%s^7: %s\n", functionName, msg));
129#define SndLog(...) if (autocvar_s_logLevel >= LOGLEVEL_DEBUG) _SndLog(__FUNC__, sprintf(__VA_ARGS__))
132_SndEntLog(
string className,
string functionName,
float edictNum,
string warnMessage)
135 print(sprintf(
"^9%f ^xF50%s (id: %d)^7: %s\n", time, functionName, edictNum, warnMessage));
137 print(sprintf(
"^xF50%s (id: %d)^7: %s\n", functionName, edictNum, warnMessage));
144#define SndEntLog(...) if (autocvar_s_logLevel >= LOGLEVEL_DEBUG) _SndEntLog(classname, __FUNC__, num_for_edict(this), sprintf(__VA_ARGS__))
202void Sound_Play(entity targetEntity,
int sndChannel,
string sndDef);
210void Sound_Update(entity targetEntity,
int sndChannel,
int sndSample,
float desiredVolume);
215void Sound_Speak(entity targetEntity,
string sentencesEntry);
#define LOGLEVEL_DEFAULT
Definition: global.h:27
logLevel_t
Definition: global.h:20
var bool autocvar_g_logTimestamps
Definition: global.h:17
float flags
Definition: sound.h:113
var logLevel_t autocvar_s_logLevel
Definition: sound.h:115
void _SndLog(string functionName, string msg)
Definition: sound.h:117
int Sound_GetID(string sndDef)
Definition: sound.qc:777
void Sound_Update(entity targetEntity, int sndChannel, int sndSample, float desiredVolume)
Client-side only: Update the sound parameters on a given entity.
Definition: sound.qc:786
void Sound_Stop(entity target, int chan)
Stops sounds on a given channel, on a target entity.
Definition: sound.qc:568
int Sound_Precache(string sndDef)
Force the precache of a soundDef file.
Definition: sound.qc:380
float maxspeed
Definition: sound.h:112
snd_t * g_sounds
Pointer to the global soundDef table.
Definition: sound.h:191
void Sound_Play(entity targetEntity, int sndChannel, string sndDef)
Play a soundDef on a given target entity.
Definition: sound.qc:574
var hashtable g_hashsounds
Global hash table for name > soundDef id lookup.
Definition: sound.h:147
void Sound_PlayAt(vector worldPos, string sndDef)
Play a soundDef a a given location.
Definition: sound.qc:693
int g_sounds_count
Total amount of registered soundDef entries.
Definition: sound.h:193
void _SndEntLog(string className, string functionName, float edictNum, string warnMessage)
Definition: sound.h:132
void Sound_Shutdown(void)
Called by CSQC_Shutdown() and in theory, somewhere on the server.
Definition: sound.qc:37
void Sound_DebugList()
Called by listSoundDef.
Definition: sound.qc:934
void Sound_PlayLocal(string shader)
Client-side only: Play a sound locally, outside the game world.
Definition: sound.qc:751
void Sound_Init(void)
Called by the client inside CSQC_Init(), and on the server inside init().
Definition: sound.qc:50
typedef enumflags
Enumeration of valid sound flags.
Definition: sound.h:151
string target
Definition: defs.h:23
A soundDef aka 'sound shader' type.
Definition: sound.h:165
soundFlag_t flags
Sound flags that are applied to this soundDef.
Definition: sound.h:173
int playc
Number of plays.
Definition: sound.h:174
float dist_min
Minimum playback distance.
Definition: sound.h:166
int sample_count
Total amount of samples within this soundDef.
Definition: sound.h:175
float pitch_min
Minimum sound pitch.
Definition: sound.h:169
float offset
Sound sample offset.
Definition: sound.h:168
float pitch_max
Maximum sound pitch.
Definition: sound.h:170
float pointparticle
Definition: sound.h:179
float dist_max
Maximum playback distance.
Definition: sound.h:167
float shakes
Earthquake/Shake amplifier.
Definition: sound.h:171
string samples
Separated list of samples.
Definition: sound.h:176
string distshader
soundDef to play where this soundDef is not audible.
Definition: sound.h:178
float volume
Desired playback volume.
Definition: sound.h:172
string name
Name of the soundDef.
Definition: sound.h:177
A sound sample of a sentences.txt word sequence.
Definition: sound.h:184
string m_strSnd
Definition: sound.h:185
float m_flLength
Definition: sound.h:186
float m_flPitch
Definition: sound.h:187