icculus quake2 doxygen  1.0 dev
sound.h File Reference

Go to the source code of this file.

Functions

void S_Init (void)
 
void S_Shutdown (void)
 
void S_StartSound (vec3_t origin, int entnum, int entchannel, struct sfx_s *sfx, float fvol, float attenuation, float timeofs)
 
void S_StartLocalSound (char *s)
 
void S_RawSamples (int samples, int rate, int width, int channels, byte *data)
 
void S_StopAllSounds (void)
 
void S_Update (vec3_t origin, vec3_t v_forward, vec3_t v_right, vec3_t v_up)
 
void S_Activate (qboolean active)
 
void S_BeginRegistration (void)
 
struct sfx_sS_RegisterSound (char *sample)
 
void S_EndRegistration (void)
 
struct sfx_sS_FindName (char *name, qboolean create)
 
void CL_GetEntitySoundOrigin (int ent, vec3_t org)
 

Function Documentation

◆ CL_GetEntitySoundOrigin()

void CL_GetEntitySoundOrigin ( int  ent,
vec3_t  org 
)

Definition at line 1547 of file cl_ents.c.

1548 {
1549  centity_t *old;
1550 
1551  if (ent < 0 || ent >= MAX_EDICTS)
1552  Com_Error (ERR_DROP, "CL_GetEntitySoundOrigin: bad ent");
1553  old = &cl_entities[ent];
1554  VectorCopy (old->lerp_origin, org);
1555 
1556  // FIXME: bmodel issues...
1557 }

Referenced by S_Spatialize().

◆ S_Activate()

void S_Activate ( qboolean  active)

Definition at line 844 of file snd_win.c.

845 {
846  if ( active )
847  {
848  if ( pDS && cl_hwnd && snd_isdirect )
849  {
851  }
852  }
853  else
854  {
855  if ( pDS && cl_hwnd && snd_isdirect )
856  {
858  }
859  }
860 }

Referenced by AppActivate().

◆ S_BeginRegistration()

void S_BeginRegistration ( void  )

Definition at line 293 of file snd_dma.c.

294 {
296  s_registering = true;
297 }

Referenced by CL_RegisterSounds().

◆ S_EndRegistration()

void S_EndRegistration ( void  )

Definition at line 328 of file snd_dma.c.

329 {
330  int i;
331  sfx_t *sfx;
332  int size;
333 
334  // free any sounds not from this registration sequence
335  for (i=0, sfx=known_sfx ; i < num_sfx ; i++,sfx++)
336  {
337  if (!sfx->name[0])
338  continue;
340  { // don't need this sound
341  if (sfx->cache) // it is possible to have a leftover
342  Z_Free (sfx->cache); // from a server that didn't finish loading
343  memset (sfx, 0, sizeof(*sfx));
344  }
345  else
346  { // make sure it is paged in
347  if (sfx->cache)
348  {
349  size = sfx->cache->length*sfx->cache->width;
350  Com_PageInMemory ((byte *)sfx->cache, size);
351  }
352  }
353 
354  }
355 
356  // load everything in
357  for (i=0, sfx=known_sfx ; i < num_sfx ; i++,sfx++)
358  {
359  if (!sfx->name[0])
360  continue;
361  S_LoadSound (sfx);
362  }
363 
364  s_registering = false;
365 }

Referenced by CL_RegisterSounds().

◆ S_FindName()

struct sfx_s* S_FindName ( char *  name,
qboolean  create 
)

Definition at line 205 of file snd_dma.c.

206 {
207  int i;
208  sfx_t *sfx;
209 
210  if (!name)
211  Com_Error (ERR_FATAL, "S_FindName: NULL\n");
212  if (!name[0])
213  Com_Error (ERR_FATAL, "S_FindName: empty name\n");
214 
215  if (strlen(name) >= MAX_QPATH)
216  Com_Error (ERR_FATAL, "Sound name too long: %s", name);
217 
218  // see if already loaded
219  for (i=0 ; i < num_sfx ; i++)
220  if (!strcmp(known_sfx[i].name, name))
221  {
222  return &known_sfx[i];
223  }
224 
225  if (!create)
226  return NULL;
227 
228  // find a free sfx
229  for (i=0 ; i < num_sfx ; i++)
230  if (!known_sfx[i].name[0])
231 // registration_sequence < s_registration_sequence)
232  break;
233 
234  if (i == num_sfx)
235  {
236  if (num_sfx == MAX_SFX)
237  Com_Error (ERR_FATAL, "S_FindName: out of sfx_t");
238  num_sfx++;
239  }
240 
241  sfx = &known_sfx[i];
242  memset (sfx, 0, sizeof(*sfx));
243  strcpy (sfx->name, name);
245 
246  return sfx;
247 }

Referenced by S_RegisterSexedSound(), and S_RegisterSound().

◆ S_Init()

void S_Init ( void  )

Definition at line 116 of file snd_dma.c.

117 {
118  cvar_t *cv;
119 
120  Com_Printf("\n------- sound initialization -------\n");
121 
122  cv = Cvar_Get ("s_initsound", "1", 0);
123  if (!cv->value)
124  Com_Printf ("not initializing.\n");
125  else
126  {
127  s_volume = Cvar_Get ("s_volume", "0.7", CVAR_ARCHIVE);
128  s_khz = Cvar_Get ("s_khz", "11", CVAR_ARCHIVE);
129  s_loadas8bit = Cvar_Get ("s_loadas8bit", "1", CVAR_ARCHIVE);
130  s_mixahead = Cvar_Get ("s_mixahead", "0.2", CVAR_ARCHIVE);
131  s_show = Cvar_Get ("s_show", "0", 0);
132  s_testsound = Cvar_Get ("s_testsound", "0", 0);
133  s_primary = Cvar_Get ("s_primary", "0", CVAR_ARCHIVE); // win32 specific
134 
135  Cmd_AddCommand("play", S_Play);
136  Cmd_AddCommand("stopsound", S_StopAllSounds);
137  Cmd_AddCommand("soundlist", S_SoundList);
138  Cmd_AddCommand("soundinfo", S_SoundInfo_f);
139 
140  if (!SNDDMA_Init())
141  return;
142 
143  S_InitScaletable ();
144 
145  sound_started = 1;
146  num_sfx = 0;
147 
148  soundtime = 0;
149  paintedtime = 0;
150 
151  Com_Printf ("sound sampling rate: %i\n", dma.speed);
152 
153  S_StopAllSounds ();
154  }
155 
156  Com_Printf("------------------------------------\n");
157 }

Referenced by CL_Init(), and CL_Snd_Restart_f().

◆ S_RawSamples()

void S_RawSamples ( int  samples,
int  rate,
int  width,
int  channels,
byte data 
)

Definition at line 938 of file snd_dma.c.

939 {
940  int i;
941  int src, dst;
942  float scale;
943 
944  if (!sound_started)
945  return;
946 
947  if (s_rawend < paintedtime)
949  scale = (float)rate / dma.speed;
950 
951 //Com_Printf ("%i < %i < %i\n", soundtime, paintedtime, s_rawend);
952  if (channels == 2 && width == 2)
953  {
954  if (scale == 1.0)
955  { // optimized case
956  for (i=0 ; i<samples ; i++)
957  {
958  dst = s_rawend&(MAX_RAW_SAMPLES-1);
959  s_rawend++;
960  s_rawsamples[dst].left =
961  LittleShort(((short *)data)[i*2]) << 8;
962  s_rawsamples[dst].right =
963  LittleShort(((short *)data)[i*2+1]) << 8;
964  }
965  }
966  else
967  {
968  for (i=0 ; ; i++)
969  {
970  src = i*scale;
971  if (src >= samples)
972  break;
973  dst = s_rawend&(MAX_RAW_SAMPLES-1);
974  s_rawend++;
975  s_rawsamples[dst].left =
976  LittleShort(((short *)data)[src*2]) << 8;
977  s_rawsamples[dst].right =
978  LittleShort(((short *)data)[src*2+1]) << 8;
979  }
980  }
981  }
982  else if (channels == 1 && width == 2)
983  {
984  for (i=0 ; ; i++)
985  {
986  src = i*scale;
987  if (src >= samples)
988  break;
989  dst = s_rawend&(MAX_RAW_SAMPLES-1);
990  s_rawend++;
991  s_rawsamples[dst].left =
992  LittleShort(((short *)data)[src]) << 8;
993  s_rawsamples[dst].right =
994  LittleShort(((short *)data)[src]) << 8;
995  }
996  }
997  else if (channels == 2 && width == 1)
998  {
999  for (i=0 ; ; i++)
1000  {
1001  src = i*scale;
1002  if (src >= samples)
1003  break;
1004  dst = s_rawend&(MAX_RAW_SAMPLES-1);
1005  s_rawend++;
1006  s_rawsamples[dst].left =
1007  ((char *)data)[src*2] << 16;
1008  s_rawsamples[dst].right =
1009  ((char *)data)[src*2+1] << 16;
1010  }
1011  }
1012  else if (channels == 1 && width == 1)
1013  {
1014  for (i=0 ; ; i++)
1015  {
1016  src = i*scale;
1017  if (src >= samples)
1018  break;
1019  dst = s_rawend&(MAX_RAW_SAMPLES-1);
1020  s_rawend++;
1021  s_rawsamples[dst].left =
1022  (((byte *)data)[src]-128) << 16;
1023  s_rawsamples[dst].right = (((byte *)data)[src]-128) << 16;
1024  }
1025  }
1026 }

Referenced by SCR_ReadNextFrame().

◆ S_RegisterSound()

struct sfx_s* S_RegisterSound ( char *  sample)

Definition at line 305 of file snd_dma.c.

306 {
307  sfx_t *sfx;
308 
309  if (!sound_started)
310  return NULL;
311 
312  sfx = S_FindName (name, true);
314 
315  if (!s_registering)
316  S_LoadSound (sfx);
317 
318  return sfx;
319 }

Referenced by CL_EntityEvent(), CL_ParseConfigString(), CL_ParseMuzzleFlash(), CL_ParseMuzzleFlash2(), CL_ParseTEnt(), CL_RegisterSounds(), CL_RegisterTEntSounds(), S_Play(), S_RegisterSexedSound(), and S_StartLocalSound().

◆ S_Shutdown()

void S_Shutdown ( void  )

Definition at line 164 of file snd_dma.c.

165 {
166  int i;
167  sfx_t *sfx;
168 
169  if (!sound_started)
170  return;
171 
172  SNDDMA_Shutdown();
173 
174  sound_started = 0;
175 
176  Cmd_RemoveCommand("play");
177  Cmd_RemoveCommand("stopsound");
178  Cmd_RemoveCommand("soundlist");
179  Cmd_RemoveCommand("soundinfo");
180 
181  // free all sounds
182  for (i=0, sfx=known_sfx ; i < num_sfx ; i++,sfx++)
183  {
184  if (!sfx->name[0])
185  continue;
186  if (sfx->cache)
187  Z_Free (sfx->cache);
188  memset (sfx, 0, sizeof(*sfx));
189  }
190 
191  num_sfx = 0;
192 }

Referenced by CL_Shutdown(), CL_Snd_Restart_f(), and SNDDMA_BeginPainting().

◆ S_StartLocalSound()

void S_StartLocalSound ( char *  s)

Definition at line 738 of file snd_dma.c.

739 {
740  sfx_t *sfx;
741 
742  if (!sound_started)
743  return;
744 
745  sfx = S_RegisterSound (sound);
746  if (!sfx)
747  {
748  Com_Printf ("S_StartLocalSound: can't cache %s\n", sound);
749  return;
750  }
751  S_StartSound (NULL, cl.playernum+1, 0, sfx, 1, 1, 0);
752 }

Referenced by CL_ParseServerMessage(), M_Draw(), M_Keydown(), and M_PopMenu().

◆ S_StartSound()

void S_StartSound ( vec3_t  origin,
int  entnum,
int  entchannel,
struct sfx_s sfx,
float  fvol,
float  attenuation,
float  timeofs 
)

Definition at line 655 of file snd_dma.c.

656 {
657  sfxcache_t *sc;
658  int vol;
659  playsound_t *ps, *sort;
660  int start;
661 
662  if (!sound_started)
663  return;
664 
665  if (!sfx)
666  return;
667 
668  if (sfx->name[0] == '*')
669  sfx = S_RegisterSexedSound(&cl_entities[entnum].current, sfx->name);
670 
671  // make sure the sound is loaded
672  sc = S_LoadSound (sfx);
673  if (!sc)
674  return; // couldn't load the sound's data
675 
676  vol = fvol*255;
677 
678  // make the playsound_t
679  ps = S_AllocPlaysound ();
680  if (!ps)
681  return;
682 
683  if (origin)
684  {
685  VectorCopy (origin, ps->origin);
686  ps->fixed_origin = true;
687  }
688  else
689  ps->fixed_origin = false;
690 
691  ps->entnum = entnum;
692  ps->entchannel = entchannel;
693  ps->attenuation = attenuation;
694  ps->volume = vol;
695  ps->sfx = sfx;
696 
697  // drift s_beginofs
698  start = cl.frame.servertime * 0.001 * dma.speed + s_beginofs;
699  if (start < paintedtime)
700  {
701  start = paintedtime;
702  s_beginofs = start - (cl.frame.servertime * 0.001 * dma.speed);
703  }
704  else if (start > paintedtime + 0.3 * dma.speed)
705  {
706  start = paintedtime + 0.1 * dma.speed;
707  s_beginofs = start - (cl.frame.servertime * 0.001 * dma.speed);
708  }
709  else
710  {
711  s_beginofs-=10;
712  }
713 
714  if (!timeofs)
715  ps->begin = paintedtime;
716  else
717  ps->begin = start + timeofs * dma.speed;
718 
719  // sort into the pending sound list
720  for (sort = s_pendingplays.next ;
721  sort != &s_pendingplays && sort->begin < ps->begin ;
722  sort = sort->next)
723  ;
724 
725  ps->next = sort;
726  ps->prev = sort->prev;
727 
728  ps->next->prev = ps;
729  ps->prev->next = ps;
730 }

Referenced by CL_EntityEvent(), CL_ParseMuzzleFlash(), CL_ParseMuzzleFlash2(), CL_ParseStartSoundPacket(), CL_ParseTEnt(), S_Play(), and S_StartLocalSound().

◆ S_StopAllSounds()

void S_StopAllSounds ( void  )

Definition at line 795 of file snd_dma.c.

796 {
797  int i;
798 
799  if (!sound_started)
800  return;
801 
802  // clear all the playsounds
803  memset(s_playsounds, 0, sizeof(s_playsounds));
806 
807  for (i=0 ; i<MAX_PLAYSOUNDS ; i++)
808  {
813  }
814 
815  // clear all the channels
816  memset(channels, 0, sizeof(channels));
817 
818  S_ClearBuffer ();
819 }

Referenced by CL_ClearState(), CL_Reconnect_f(), GetSoundtime(), S_Init(), SCR_BeginLoadingPlaque(), and VID_CheckChanges().

◆ S_Update()

void S_Update ( vec3_t  origin,
vec3_t  v_forward,
vec3_t  v_right,
vec3_t  v_up 
)

Definition at line 1037 of file snd_dma.c.

1038 {
1039  int i;
1040  int total;
1041  channel_t *ch;
1042  channel_t *combine;
1043 
1044  if (!sound_started)
1045  return;
1046 
1047  // if the laoding plaque is up, clear everything
1048  // out to make sure we aren't looping a dirty
1049  // dma buffer while loading
1050  if (cls.disable_screen)
1051  {
1052  S_ClearBuffer ();
1053  return;
1054  }
1055 
1056  // rebuild scale tables if volume is modified
1057  if (s_volume->modified)
1058  S_InitScaletable ();
1059 
1060  VectorCopy(origin, listener_origin);
1064 
1065  combine = NULL;
1066 
1067  // update spatialization for dynamic sounds
1068  ch = channels;
1069  for (i=0 ; i<MAX_CHANNELS; i++, ch++)
1070  {
1071  if (!ch->sfx)
1072  continue;
1073  if (ch->autosound)
1074  { // autosounds are regenerated fresh each frame
1075  memset (ch, 0, sizeof(*ch));
1076  continue;
1077  }
1078  S_Spatialize(ch); // respatialize channel
1079  if (!ch->leftvol && !ch->rightvol)
1080  {
1081  memset (ch, 0, sizeof(*ch));
1082  continue;
1083  }
1084  }
1085 
1086  // add loopsounds
1087  S_AddLoopSounds ();
1088 
1089  //
1090  // debugging output
1091  //
1092  if (s_show->value)
1093  {
1094  total = 0;
1095  ch = channels;
1096  for (i=0 ; i<MAX_CHANNELS; i++, ch++)
1097  if (ch->sfx && (ch->leftvol || ch->rightvol) )
1098  {
1099  Com_Printf ("%3i %3i %s\n", ch->leftvol, ch->rightvol, ch->sfx->name);
1100  total++;
1101  }
1102 
1103  Com_Printf ("----(%i)---- painted: %i\n", total, paintedtime);
1104  }
1105 
1106 // mix some sound
1107  S_Update_();
1108 }

Referenced by CL_Frame().

MAX_CHANNELS
#define MAX_CHANNELS
Definition: snd_loc.h:126
listener_up
vec3_t listener_up
Definition: snd_dma.c:52
listener_origin
vec3_t listener_origin
Definition: snd_dma.c:49
s_testsound
cvar_t * s_testsound
Definition: snd_dma.c:75
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
s_freeplays
playsound_t s_freeplays
Definition: snd_dma.c:69
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
sfxcache_t::length
int length
Definition: snd_loc.h:31
channel_t::sfx
sfx_t * sfx
Definition: snd_loc.h:77
client_static_t::disable_screen
float disable_screen
Definition: client.h:232
S_SoundInfo_f
void S_SoundInfo_f(void)
Definition: snd_dma.c:92
playsound_s
Definition: snd_loc.h:50
channel_t::autosound
qboolean autosound
Definition: snd_loc.h:89
s_playsounds
playsound_t s_playsounds[MAX_PLAYSOUNDS]
Definition: snd_dma.c:68
s_rawend
int s_rawend
Definition: snd_dma.c:83
cvar_s::modified
qboolean modified
Definition: q_shared.h:323
channel_t::rightvol
int rightvol
Definition: snd_loc.h:79
pDS
LPDIRECTSOUND pDS
Definition: snd_win.c:70
MAX_PLAYSOUNDS
#define MAX_PLAYSOUNDS
Definition: snd_dma.c:67
S_Update_
void S_Update_()
Definition: snd_dma.c:1140
i
int i
Definition: q_shared.c:305
sfx_s
Definition: snd_loc.h:39
channel_t::leftvol
int leftvol
Definition: snd_loc.h:78
S_Spatialize
void S_Spatialize(channel_t *ch)
Definition: snd_dma.c:477
SNDDMA_Init
int SNDDMA_Init(void)
Definition: snd_win.c:593
width
GLint GLsizei width
Definition: qgl_win.c:115
DS_CreateBuffers
static qboolean DS_CreateBuffers(void)
Definition: snd_win.c:100
Cvar_Get
cvar_t * Cvar_Get(char *var_name, char *var_value, int flags)
Definition: cvar.c:127
cvar_s
Definition: q_shared.h:317
S_RegisterSexedSound
struct sfx_s * S_RegisterSexedSound(entity_state_t *ent, char *base)
Definition: snd_dma.c:587
num_sfx
int num_sfx
Definition: snd_dma.c:65
playsound_s::attenuation
float attenuation
Definition: snd_loc.h:55
portable_samplepair_t::left
int left
Definition: snd_loc.h:25
s_volume
cvar_t * s_volume
Definition: snd_dma.c:74
s_mixahead
cvar_t * s_mixahead
Definition: snd_dma.c:79
s_beginofs
int s_beginofs
Definition: snd_dma.c:72
s_primary
cvar_t * s_primary
Definition: snd_dma.c:80
centity_t::lerp_origin
vec3_t lerp_origin
Definition: client.h:84
playsound_s::begin
unsigned begin
Definition: snd_loc.h:60
playsound_s::sfx
sfx_t * sfx
Definition: snd_loc.h:53
MAX_RAW_SAMPLES
#define MAX_RAW_SAMPLES
Definition: snd_loc.h:138
Cmd_RemoveCommand
void Cmd_RemoveCommand(char *cmd_name)
Definition: cmd.c:724
playsound_s::prev
struct playsound_s * prev
Definition: snd_loc.h:52
sfx_s::cache
sfxcache_t * cache
Definition: snd_loc.h:43
S_LoadSound
sfxcache_t * S_LoadSound(sfx_t *s)
Definition: snd_mem.c:98
S_RegisterSound
sfx_t * S_RegisterSound(char *name)
Definition: snd_dma.c:305
s_registering
qboolean s_registering
Definition: snd_dma.c:54
centity_t
Definition: client.h:75
S_FindName
sfx_t * S_FindName(char *name, qboolean create)
Definition: snd_dma.c:205
playsound_s::next
struct playsound_s * next
Definition: snd_loc.h:52
paintedtime
int paintedtime
Definition: snd_dma.c:57
forward
static vec3_t forward
Definition: p_view.c:29
playsound_s::volume
float volume
Definition: snd_loc.h:54
S_AllocPlaysound
playsound_t * S_AllocPlaysound(void)
Definition: snd_dma.c:505
Cmd_AddCommand
void Cmd_AddCommand(char *cmd_name, xcommand_t function)
Definition: cmd.c:691
CVAR_ARCHIVE
#define CVAR_ARCHIVE
Definition: q_shared.h:309
snd_isdirect
static qboolean snd_isdirect
Definition: snd_win.c:42
cl_hwnd
HWND cl_hwnd
Definition: vid_dll.c:53
playsound_s::entchannel
int entchannel
Definition: snd_loc.h:57
cvar_s::value
float value
Definition: q_shared.h:324
dma_t::speed
int speed
Definition: snd_loc.h:70
NULL
#define NULL
Definition: q_shared.h:60
client_state_t::frame
frame_t frame
Definition: client.h:136
listener_right
vec3_t listener_right
Definition: snd_dma.c:51
dma
dma_t dma
Definition: snd_dma.c:47
channel_t
Definition: snd_loc.h:75
channels
channel_t channels[MAX_CHANNELS]
Definition: snd_dma.c:42
MAX_SFX
#define MAX_SFX
Definition: snd_dma.c:63
Com_Error
void Com_Error(int code, char *fmt,...)
Definition: common.c:203
client_state_t::playernum
int playernum
Definition: client.h:176
current
static int current
Definition: cl_scrn.c:131
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:736
S_SoundList
void S_SoundList(void)
Definition: snd_dma.c:1209
name
cvar_t * name
Definition: cl_main.c:94
MAX_EDICTS
#define MAX_EDICTS
Definition: q_shared.h:80
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:735
s_rawsamples
portable_samplepair_t s_rawsamples[MAX_RAW_SAMPLES]
Definition: snd_dma.c:84
S_Play
void S_Play(void)
Definition: snd_dma.c:1187
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:158
rate
cvar_t * rate
Definition: cl_main.c:96
S_ClearBuffer
void S_ClearBuffer(void)
Definition: snd_dma.c:760
playsound_s::origin
vec3_t origin
Definition: snd_loc.h:59
Z_Free
void Z_Free(void *ptr)
Definition: common.c:1141
up
static vec3_t up
Definition: p_view.c:29
s_registration_sequence
int s_registration_sequence
Definition: snd_dma.c:40
s_loadas8bit
cvar_t * s_loadas8bit
Definition: snd_dma.c:76
Com_PageInMemory
void Com_PageInMemory(byte *buffer, int size)
Definition: q_shared.c:1161
S_InitScaletable
void S_InitScaletable(void)
Definition: snd_mix.c:350
playsound_s::entnum
int entnum
Definition: snd_loc.h:56
portable_samplepair_t::right
int right
Definition: snd_loc.h:26
s_pendingplays
playsound_t s_pendingplays
Definition: snd_dma.c:70
sfxcache_t
Definition: snd_loc.h:29
S_StopAllSounds
void S_StopAllSounds(void)
Definition: snd_dma.c:795
listener_forward
vec3_t listener_forward
Definition: snd_dma.c:50
s_show
cvar_t * s_show
Definition: snd_dma.c:78
playsound_s::fixed_origin
qboolean fixed_origin
Definition: snd_loc.h:58
known_sfx
sfx_t known_sfx[MAX_SFX]
Definition: snd_dma.c:64
sfxcache_t::width
int width
Definition: snd_loc.h:34
Com_Printf
void Com_Printf(char *fmt,...)
Definition: common.c:102
right
GLdouble right
Definition: qgl_win.c:159
sound_started
int sound_started
Definition: snd_dma.c:45
cls
client_static_t cls
Definition: cl_main.c:105
soundtime
int soundtime
Definition: snd_dma.c:56
frame_t::servertime
int servertime
Definition: client.h:67
S_AddLoopSounds
void S_AddLoopSounds(void)
Definition: snd_dma.c:830
SNDDMA_Shutdown
void SNDDMA_Shutdown(void)
Definition: snd_win.c:829
cl_entities
centity_t cl_entities[MAX_EDICTS]
Definition: cl_main.c:108
cl
client_state_t cl
Definition: cl_main.c:106
DS_DestroyBuffers
static void DS_DestroyBuffers(void)
Definition: snd_win.c:247
S_StartSound
void S_StartSound(vec3_t origin, int entnum, int entchannel, sfx_t *sfx, float fvol, float attenuation, float timeofs)
Definition: snd_dma.c:655
sfx_s::name
char name[MAX_QPATH]
Definition: snd_loc.h:41
sfx_s::registration_sequence
int registration_sequence
Definition: snd_loc.h:42
s_khz
cvar_t * s_khz
Definition: snd_dma.c:77