34#define SND_MIN_SPEED 8000
35#define SND_MAX_SPEED 192000
36#define SND_MIN_WIDTH 1
37#define SND_MAX_WIDTH 2
38#define SND_MIN_CHANNELS 1
39#define SND_MAX_CHANNELS 8
41# error this data only supports up to 8 channel, update it!
49#define SND_SPEAKERLAYOUTS (sizeof(snd_speakerlayouts) / sizeof(snd_speakerlayouts[0]))
55 {0, 45, 0.2f, 0.2f, 0.5f},
56 {1, 315, 0.2f, 0.2f, 0.5f},
57 {2, 135, 0.2f, 0.2f, 0.5f},
58 {3, 225, 0.2f, 0.2f, 0.5f},
59 {4, 0, 0.2f, 0.2f, 0.5f},
61 {6, 90, 0.2f, 0.2f, 0.5f},
62 {7, 180, 0.2f, 0.2f, 0.5f},
68 {0, 45, 0.2f, 0.2f, 0.5f},
69 {1, 315, 0.2f, 0.2f, 0.5f},
70 {2, 135, 0.2f, 0.2f, 0.5f},
71 {3, 225, 0.2f, 0.2f, 0.5f},
72 {4, 0, 0.2f, 0.2f, 0.5f},
83 {0, 45, 0.3f, 0.3f, 0.8f},
84 {1, 315, 0.3f, 0.3f, 0.8f},
85 {2, 135, 0.3f, 0.3f, 0.8f},
86 {3, 225, 0.3f, 0.3f, 0.8f},
98 {0, 90, 0.5f, 0.5f, 1},
99 {1, 270, 0.5f, 0.5f, 1},
151#ifdef CONFIG_VIDEO_CAPTURE
152static qbool recording_sound =
false;
171cvar_t snd_streaming = {
CF_CLIENT |
CF_ARCHIVE,
"snd_streaming",
"1",
"enables keeping compressed ogg sound files compressed, decompressing them only as needed, otherwise they will be decompressed completely at load (may use a lot of memory); when set to 2, streaming is performed even if this would waste memory"};
178cvar_t snd_soundradius = {
CF_CLIENT |
CF_ARCHIVE,
"snd_soundradius",
"1200",
"radius of weapon sounds and other standard sound effects (monster idle noises are half this radius and flickering light noises are one third of this radius)"};
194cvar_t snd_softclip = {
CF_CLIENT |
CF_ARCHIVE,
"snd_softclip",
"0",
"Use soft-clipping. Soft-clipping can make the sound more smooth if very high volume levels are used. Enable this option if the dynamic range of the loudspeakers is very low. WARNING: This feature creates distortion and should be considered a last resort."};
248cvar_t snd_bufferlength = {
CF_CLIENT |
CF_ARCHIVE,
"snd_bufferlength",
"20",
"Desired length of the SDL2 audio buffer in milliseconds, smaller values reduce latency but can lead to underflow if the system is heavily loaded. Affects only how many sample frames are requested (which will be a power of 2 between 512 and 8192 inclusive)"};
259static const char*
ambient_names [2] = {
"sound/ambience/water1.wav",
"sound/ambience/wind2.wav" };
281 if (!strrchr (
name,
'.'))
330 if (sfx->fetcher !=
NULL)
334 size = (
unsigned int)sfx->memsize;
335 Con_Printf (
"%c%c%c(%5iHz %2db %6s) %8i : %s\n",
336 (sfx->loopstart < sfx->total_length) ?
'L' :
' ',
340 sfx->format.width * 8,
341 (sfx->format.channels == 1) ?
"mono" :
"stereo",
347 Con_Printf (
" ( unknown ) unloaded : %s\n", sfx->name);
393#define SWAP_LISTENERS(l1, l2, tmpl) { tmpl = (l1); (l1) = (l2); (l2) = tmpl; }
407 Con_Printf(
"S_SetChannelLayout: can't find the speaker layout for %hu channels. Defaulting to mono output\n",
466 Con_Printf(
"S_SetChannelLayout: using %s speaker layout for 3D sound\n",
496 _dupenv_s(&env, &envlen,
"QUAKE_SOUND_CHANNELS");
498 env = getenv(
"QUAKE_SOUND_CHANNELS");
508 _dupenv_s(&env, &envlen,
"QUAKE_SOUND_SPEED");
510 env = getenv(
"QUAKE_SOUND_SPEED");
514 chosen_fmt.
speed = atoi (env);
520 _dupenv_s(&env, &envlen,
"QUAKE_SOUND_SAMPLEBITS");
522 env = getenv(
"QUAKE_SOUND_SAMPLEBITS");
526 chosen_fmt.
width = atoi (env) / 8;
564 if (prev_render_format.
speed != 0)
566 if (chosen_fmt.
speed != prev_render_format.
speed)
568 Con_Printf(
"S_Startup: sound speed has changed! This is NOT supported yet. Falling back to previous speed (%u Hz)\n",
569 prev_render_format.
speed);
589 else if (chosen_fmt.
width == 3)
591 chosen_fmt.
width = 4;
610 Con_Printf(
"S_Startup: initializing sound output format: %dHz, %d bit, %d channels...\n",
617 Con_Print(
"S_Startup: SndSys_Init failed.\n");
624 Con_Print (
"S_Startup: simulating sound output\n");
628 Con_Printf(
"Sound format: %dHz, %d channels, %d bits per sample\n",
661#ifdef CONFIG_VIDEO_CAPTURE
662 recording_sound =
false;
693 Con_Printf(
"snd_restart would wreak havoc if you do that while connected!\n");
872 Con_Printf(
"snd_unloadallsounds would wreak havoc if you do that while connected!\n");
914 if(!strcmp (sfx->name,
name))
920 int soundindex = atoi(
name + 1);
921 if (soundindex > 0 && soundindex <
MAX_SOUNDS)
928 memset (sfx, 0,
sizeof(*sfx));
930 sfx->memsize =
sizeof(*sfx);
952 Con_Printf (
"unloading sound %s\n", sfx->name);
961 for (prev_sfx =
known_sfx; prev_sfx !=
NULL; prev_sfx = prev_sfx->next)
962 if (prev_sfx->next == sfx)
964 prev_sfx->next = sfx->next;
967 if (prev_sfx ==
NULL)
969 Con_Printf (
"S_FreeSfx: Can't find SFX %s in the list!\n", sfx->name);
979 Con_Printf(
"S_FreeSfx: stopping channel %i for sfx \"%s\"\n",
i, sfx->name);
985 if (sfx->fetcher !=
NULL && sfx->fetcher->freesfx !=
NULL)
986 sfx->fetcher->freesfx(sfx);
1036 sfxnext = sfx->next;
1065 sfx->flags &= ~ SFXFLAG_FILEMISSING;
1122 int first_life_left, life_left;
1128 first_life_left = 0x7fffffff;
1154 first_to_die = ch_idx;
1155 goto emptychan_found;
1165 life_left = (
int)((
double)sfx->total_length - ch->
position);
1167 if (life_left < first_life_left)
1169 first_life_left = life_left;
1170 first_to_die = ch_idx;
1174 if (first_to_die == -1)
1195 float angle_side, angle_front, angle_factor, mixspeed;
1331 if(sfx->volume_peak > 0)
1335 mastervol *= sfx->volume_mult;
1350 mastervol =
max(0.0f, mastervol);
1387 qbool occluded =
false;
1410 angle_factor = 0.5f;
1442 angle_side = acos(source_vec[0]) /
M_PI * 180;
1443 angle_front = asin(source_vec[1]) /
M_PI * 180;
1451 if (angle_front > 0)
1452 angle_factor = 1 - angle_factor;
1505 sfx_t *sfx = ch->
sfx;
1514static void S_PlaySfxOnChannel (sfx_t *sfx,
channel_t *target_chan,
unsigned int flags,
vec3_t origin,
float fvol,
float attenuation,
qbool isstatic,
int entnum,
int entchannel,
int startpos,
float fspeed)
1518 Con_Printf(
"S_PlaySfxOnChannel called with NULL??\n");
1535 if (target_chan->
sfx)
1538 Con_Printf(
"S_PlaySfxOnChannel(%s): channel %i already in use?? Clearing.\n", sfx->name, channelindex);
1543 memset (target_chan, 0,
sizeof (*target_chan));
1554 Con_DPrintf(
"Quake compatibility warning: Static sound \"%s\" is not looped\n", sfx->name);
1567 target_chan->
sfx = sfx;
1574 int ch_idx, startpos,
i;
1601 if (sfx->fetcher ==
NULL)
1612 startpos = (
int)(startposition * sfx->format.speed);
1617 if (check == target_chan)
1626 if(maxticsdelta == 0 ||
fabs(maxticsdelta) >
fabs(maxtime))
1629 maxdelta =
fabs(maxticsdelta) * ((maxtime > 0) ? 1 : -1);
1632 startpos =
lhrandom(0, maxdelta * sfx->format.speed);
1638 S_PlaySfxOnChannel (sfx, target_chan,
flags,
origin, fvol, attenuation,
false,
entnum, entchannel, startpos, fspeed);
1667 if (sfx->fetcher !=
NULL && sfx->fetcher->stopchannel !=
NULL)
1668 sfx->fetcher->stopchannel(ch);
1778 sfx_t *sfx = ch->
sfx;
1782 s = ch->
position / sfx->format.speed;
1817 Con_Printf (
"S_StaticSound: \"%s\" hasn't been precached\n", sfx->name);
1823 Con_Print(
"S_StaticSound: total_channels == MAX_CHANNELS\n");
1828 S_PlaySfxOnChannel (sfx, target_chan,
CHANNELFLAG_FORCELOOP,
origin, fvol, attenuation,
true, 0, 0, 0, 1.0f);
1841 int ambient_channel;
1846 memset(ambientlevels, 0,
sizeof(ambientlevels));
1854 for (ambient_channel = 0 ; ambient_channel<
NUM_AMBIENTS ; ambient_channel++)
1858 if (sfx ==
NULL || sfx->fetcher ==
NULL)
1861 i = ambientlevels[ambient_channel];
1864 vol =
i * (1.0f / 256.0f);
1897 unsigned int newsoundtime, paintedtime, endtime, maxtime, usedframes;
1898 int usesoundtimehack;
1899 static int soundtimehack = -1;
1900 static int oldsoundtime = 0;
1907 usesoundtimehack =
true;
1910 usesoundtimehack = 1;
1913#ifdef CONFIG_VIDEO_CAPTURE
1914 else if (
cls.capturevideo.soundrate && !
cls.capturevideo.realtime)
1916 usesoundtimehack = 2;
1922 usesoundtimehack = 3;
1927#ifdef CONFIG_VIDEO_CAPTURE
1932 usesoundtimehack = 0;
1936 if (soundtimehack != usesoundtimehack)
1954 soundtimehack = usesoundtimehack;
1967#ifdef CONFIG_VIDEO_CAPTURE
1968 if ((
cls.capturevideo.soundrate != 0) != recording_sound)
1970 unsigned int additionaltime;
1981 newsoundtime += additionaltime;
1982 Con_DPrintf(
"S_PaintAndSubmit: new extra sound time = %u\n",
1985 else if (!soundtimehack)
1989 Con_Printf(
"S_PaintAndSubmit: WARNING: newsoundtime < soundtime (%u < %u)\n",
1993#ifdef CONFIG_VIDEO_CAPTURE
1994 recording_sound = (
cls.capturevideo.soundrate != 0);
2001 Con_DPrint(
">> S_PaintAndSubmit: SndSys_LockRenderBuffer() failed\n");
2017 endtime =
min(endtime, maxtime);
2019 while (paintedtime < endtime)
2021 unsigned int startoffset;
2022 unsigned int nbframes;
2025 nbframes = endtime - paintedtime;
2033 paintedtime += nbframes;
2063 unsigned int i, j, k;
2076 double mindist_trans, maxdist_trans;
2098 if(mindist_trans - maxdist_trans == 0)
2180 if (!(combine && combine != ch && combine->
sfx == ch->
sfx))
2193 if (combine && combine != ch && combine->
sfx == ch->
sfx)
2228 Con_Printf(
"S_LocalSound: can't precache %s\n", sound);
int CDAudio_Startup(void)
void CDAudio_Shutdown(void)
model_t * CL_GetModelByIndex(int modelindex)
void Cmd_AddCommand(unsigned flags, const char *cmd_name, xcommand_t function, const char *description)
called by the init functions of other parts of the program to register commands and functions to call...
void Cmd_NoOperation_f(cmd_state_t *cmd)
#define CF_READONLY
cvar cannot be changed from the console or the command buffer, and is considered CF_PERSISTENT
static int Cmd_Argc(cmd_state_t *cmd)
static const char * Cmd_Argv(cmd_state_t *cmd, int arg)
Cmd_Argv(cmd, ) will return an empty string (not a NULL) if arg > argc, so string operations are alwa...
#define CF_CLIENT
cvar/command that only the client can change/execute
#define CF_ARCHIVE
cvar should have its set value saved to config.cfg and persist across sessions
char * va(char *buf, size_t buflen, const char *format,...)
@ PROTOCOL_QUAKE
quake (aka netquake/normalquake/nq) protocol
@ PROTOCOL_QUAKEWORLD
quakeworld protocol
#define dp_strlcat(dst, src, dsize)
#define dp_strlcpy(dst, src, dsize)
void Con_Print(const char *msg)
Prints to all appropriate console targets, and adds timestamps.
void Con_DPrintf(const char *fmt,...)
A Con_Printf that only shows up if the "developer" cvar is set.
void Con_Printf(const char *fmt,...)
Prints to all appropriate console targets.
void Con_DPrint(const char *msg)
A Con_Print that only shows up if the "developer" cvar is set.
int CL_VM_GetViewEntity(void)
qbool CL_VM_GetEntitySoundOrigin(int entnum, vec3_t out)
float Cvar_VariableValueOr(cvar_state_t *cvars, const char *var_name, float def, unsigned neededflags)
void Cvar_SetValueQuick(cvar_t *var, float value)
void Cvar_RegisterVariable(cvar_t *variable)
registers a cvar that already has the name, string, and optionally the archive elements set.
static int(ZEXPORT *qz_inflate)(z_stream *strm
GLsizei const GLfloat * value
#define VectorNormalize(v)
#define bound(min, num, max)
#define lhrandom(MIN, MAX)
LadyHavoc: this function never returns exactly MIN or exactly MAX, because of a QuakeC bug in id1 whe...
#define boolxor(a, b)
boolean XOR (why doesn't C have the ^^ operator for this purpose?)
#define VectorSubtract(a, b, out)
#define VectorCopy(in, out)
#define VectorScale(in, scale, out)
#define VectorMAM(scale1, b1, scale2, b2, out)
void Matrix4x4_Concat(matrix4x4_t *out, const matrix4x4_t *in1, const matrix4x4_t *in2)
void Matrix4x4_Transform(const matrix4x4_t *in, const float v[3], float out[3])
void Matrix4x4_CreateFromQuakeEntity(matrix4x4_t *out, double x, double y, double z, double pitch, double yaw, double roll, double scale)
void Matrix4x4_Invert_Simple(matrix4x4_t *out, const matrix4x4_t *in1)
void Matrix4x4_OriginFromMatrix(const matrix4x4_t *in, float *out)
#define CHECKPVSBIT(pvs, b)
#define MAX_EDICTS
max number of objects in game world at once (32768 protocol limit)
#define MAX_DYNAMIC_CHANNELS
#define MAX_SOUNDS
max number of sounds loaded at once
#define MAX_QPATH
max length of a quake game pathname
void R_TimeReport(const char *desc)
cvar_t snd_csqcchannel6volume
cvar_t snd_spatialization_max
static void S_PauseSound_f(cmd_state_t *cmd)
cvar_t snd_channel6volume
cvar_t snd_csqcchannel2volume
cvar_t snd_spatialization_min
static void S_SoundInfo_f(cmd_state_t *cmd)
qbool snd_threaded
enables use of snd_usethreadedmixing, provided that no sound hacks are in effect (like timedemo)
cvar_t snd_attenuation_decibel
static cvar_t snd_startloopingsounds
cvar_t snd_playerchannel2volume
cvar_t snd_entchannel3volume
cvar_t snd_attenuation_exponent
static bool current_swapstereo
static unsigned int soundtime
cvar_t snd_playerchannel1volume
cvar_t snd_csqcchannel4volume
static cvar_t snd_identicalsoundrandomization_tics
void S_StaticSound(sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
cvar_t snd_spatialization_min_radius
cvar_t snd_entchannel6volume
void S_SetChannelVolume(unsigned int ch_ind, float fvol)
static const speakerlayout_t snd_speakerlayouts[]
void S_StopAllSounds(void)
int S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation)
S_StartSound returns the channel index, or -1 if an error occurred.
bool snd_blocked
When true, we submit silence to the audio device.
cvar_t snd_entchannel2volume
cvar_t snd_entchannel5volume
static void S_SetChannelLayout(void)
void S_FreeSfx(sfx_t *sfx, qbool force)
qbool S_LocalSound(const char *sound)
cvar_t cl_gameplayfix_soundsmovewithentities
qbool simsound
If simsound is true, the sound card is not initialized and no sound is submitted to it.
cvar_t snd_channel4volume
static cvar_t ambient_level
void S_StopAllSounds_f(cmd_state_t *cmd)
static int listener_pvsbytes
static sfx_t * ambient_sfxs[2]
cvar_t snd_entchannel7volume
cvar_t snd_worldchannel5volume
cvar_t snd_spatialization_power
matrix4x4_t listener_matrix[SND_LISTENERS]
float S_GetChannelPosition(unsigned int ch_ind)
static unsigned char * listener_pvs
static cvar_t snd_startnonloopingsounds
cvar_t snd_worldchannel3volume
static int current_channellayout
cvar_t snd_playerchannel6volume
static cvar_t snd_identicalsoundrandomization_time
cvar_t snd_playerchannel4volume
cvar_t snd_csqcchannel0volume
cvar_t snd_channel3volume
void S_Update(const matrix4x4_t *listenermatrix)
unsigned int total_channels
void S_StopChannel(unsigned int channel_ind, qbool lockmutex, qbool freesfx)
static unsigned int extrasoundtime
cvar_t snd_csqcchannel1volume
static float spatialoffset
static void S_Play2_f(cmd_state_t *cmd)
cvar_t snd_playerchannel7volume
static cvar_t snd_channels
speakerlayout_t snd_speakerlayout
cvar_t snd_playerchannel0volume
void S_PauseGameSounds(qbool toggle)
sfx_t * S_FindName(const char *name)
cvar_t snd_maxchannelvolume
cvar_t snd_csqcchannel3volume
static void SND_Spatialize(channel_t *ch, qbool isstatic)
static void S_UpdateAmbientSounds(void)
static float spatialfactor
float S_SoundLength(const char *name)
static cvar_t snd_precache
static void SND_Spatialize_WithSfx(channel_t *ch, qbool isstatic, sfx_t *sfx)
cvar_t snd_csqcchannel5volume
qbool S_SetChannelFlag(unsigned int ch_ind, unsigned int flag, qbool value)
static void S_Play_Common(cmd_state_t *cmd, float fvol, float attenuation)
cvar_t snd_spatialization_prologic
cvar_t snd_worldchannel7volume
cvar_t snd_playerchannel5volume
cvar_t snd_csqcchannel7volume
cvar_t snd_playerchannel3volume
cvar_t snd_spatialization_control
int S_GetSoundChannels(void)
static unsigned int oldpaintedtime
float S_GetEntChannelPosition(int entnum, int entchannel)
channel_t channels[MAX_CHANNELS]
cvar_t snd_channel7volume
#define SWAP_LISTENERS(l1, l2, tmpl)
qbool S_LocalSoundEx(const char *sound, int chan, float fvol)
snd_ringbuffer_t * snd_renderbuffer
static int current_channellayout_used
cvar_t snd_worldchannel4volume
qbool S_IsSoundPrecached(const sfx_t *sfx)
cvar_t snd_channel5volume
static void S_Play_f(cmd_state_t *cmd)
static cvar_t ambient_fade
cvar_t snd_channel1volume
void S_UnloadAllSounds_f(cmd_state_t *cmd)
cvar_t snd_channel0volume
void S_StopSound(int entnum, int entchannel)
cvar_t snd_entchannel4volume
void S_SetChannelSpeed(unsigned int ch_ind, float fspeed)
static void S_SoundList_f(cmd_state_t *cmd)
int S_StartSound_StartPosition_Flags(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, float fvol, float attenuation, float startposition, int flags, float fspeed)
cvar_t snd_spatialization_prologic_frontangle
static void S_PlayVol_f(cmd_state_t *cmd)
matrix4x4_t listener_basematrix
cvar_t snd_channel2volume
cvar_t snd_entchannel1volume
cvar_t snd_worldchannel0volume
sfx_t * S_PrecacheSound(const char *name, qbool complain, qbool levelsound)
int S_GetSoundWidth(void)
static const char * ambient_names[2]
spatialmethod_t spatialmethod
cvar_t snd_streaming_length
static float spatialpower
static double snd_starttime
cvar_t snd_entchannel0volume
qbool snd_usethreadedmixing
if true, the main thread does not mix sound, soundtime does not advance, and neither does snd_renderb...
cvar_t snd_spatialization_occlusion
static void S_PlaySfxOnChannel(sfx_t *sfx, channel_t *target_chan, unsigned int flags, vec3_t origin, float fvol, float attenuation, qbool isstatic, int entnum, int entchannel, int startpos, float fspeed)
cvar_t snd_worldchannel2volume
#define SND_SPEAKERLAYOUTS
cvar_t snd_worldchannel1volume
cvar_t snd_worldchannel6volume
static channel_t * SND_PickChannel(int entnum, int entchannel)
static void S_PaintAndSubmit(void)
cvar_t snd_spatialization_max_radius
static void S_Restart_f(cmd_state_t *cmd)
#define SND_CHANNELLAYOUT_STANDARD
void SndSys_Submit(void)
Submit the contents of "snd_renderbuffer" to the sound card.
#define SND_CHANNELLAYOUT_ALSA
#define SFXFLAG_STREAMED
informative only. You shouldn't need to know that
snd_ringbuffer_t * Snd_CreateRingBuffer(const snd_format_t *format, unsigned int sampleframes, void *buffer)
If "buffer" is NULL, the function allocates one buffer of "sampleframes" sample frames itself (if "sa...
qbool S_LoadSound(struct sfx_s *sfx, qbool complain)
qbool SndSys_Init(snd_format_t *fmt)
Create "snd_renderbuffer", attempting to use the chosen sound format, but accepting if the driver wan...
void S_SetUnderwaterIntensity(void)
#define SFXFLAG_LEVELSOUND
the sfx is part of the server or client precache list for this level
unsigned int SndSys_GetSoundTime(void)
Returns the number of sample frames consumed since the sound started.
void S_MixToBuffer(void *stream, unsigned int frames)
#define SFXFLAG_MENUSOUND
not freed during level change (menu sounds, music, etc)
void SndSys_Shutdown(void)
Stop the sound card, delete "snd_renderbuffer" and free its other resources.
#define SND_CHANNELLAYOUT_AUTO
qbool SndSys_LockRenderBuffer(void)
Get the exclusive lock on "snd_renderbuffer".
void SndSys_UnlockRenderBuffer(void)
Release the exclusive lock on "snd_renderbuffer".
qbool OGG_OpenLibrary(void)
void OGG_CloseLibrary(void)
qbool XMP_OpenLibrary(void)
void XMP_CloseLibrary(void)
#define CHAN_ENGINE2CVAR(c)
#define IS_CHAN_SINGLE(n)
#define CHANNELFLAG_LOCALSOUND
#define CHANNELFLAG_FORCELOOP
#define CHANNELFLAG_FULLVOLUME
#define CHANNELFLAG_PAUSED
unsigned int flags
cf CHANNELFLAG_* defines
int prologic_invert
whether a sound is played on the surround channels in prologic
float volume[SND_LISTENERS]
spatialized volume per speaker (mastervol * distanceattenuation * channelvolume cvars)
float basevolume
0-1 master volume
double position
updated ONLY by mixer position in sfx, starts at 0, loops or stops at sfx->total_length
vec_t distfade
distance multiplier (attenuation/clipK)
int entchannel
which channel id on the entity
float basespeed
playback rate multiplier for pitch variation
struct sfx_s * sfx
pointer to sound sample being used
float mixspeed
these are often updated while mixer is running, glitching should be minimized (mismatched channel vol...
vec3_t origin
origin of sound effect
void * fetcher_data
Per-channel data for the sound fetching function.
int entnum
makes sound follow entity origin (allows replacing interrupting existing sound on same id)
unsigned short csqc_server2csqcentitynumber[MAX_EDICTS]
struct sfx_s * sound_precache[MAX_SOUNDS]
struct model_s * worldmodel
cl_soundstats_t soundstats
protocolversion_t protocol
command interpreter state - the tokenizing and execution of commands, as well as pointers to which cv...
unsigned short modelindex
entity_state_t state_current
double realtime
the accumulated mainloop time since application started (with filtering), without any slowmo or clamp...
unsigned int flags
cf SFXFLAG_* defines
unsigned int startframe
index of the first frame in the buffer if startframe == endframe, the bufffer is empty
unsigned int maxframes
max size (buffer size), in sample frames
unsigned int endframe
index of the first EMPTY frame in the "ring" buffer may be smaller than startframe if the "ring" buff...
listener_t listeners[SND_LISTENERS]
int Sys_CheckParm(const char *parm)
#define Mem_FreePool(pool)
#define Mem_Alloc(pool, size)
#define Mem_AllocPool(name, flags, parent)