QuakeForge  0.7.2.210-815cf
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages

Functions

struct channel_sS_AllocChannel (void)
 Allocate a sound channel that can be used for playing sounds. More...
 
void S_AmbientOff (void)
 Disable ambient sounds. More...
 
void S_AmbientOn (void)
 Enable ambient sounds. More...
 
void S_BlockSound (void)
 Pause the sound output. More...
 
void S_ChannelStop (struct channel_s *chan)
 Stop and safely free a channel. More...
 
void S_ExtraUpdate (void)
 Render some more sound without updating the client's position/orientation. More...
 
sfx_tS_LoadSound (const char *name)
 Pre-load a sound. More...
 
void S_LocalSound (const char *s)
 Start a sound local to the client view. More...
 
sfx_tS_PrecacheSound (const char *sample)
 Pre-load a sound into the cache. More...
 
void S_Progs_Init (struct progs_s *pr)
 
void S_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin, float fvol, float attenuation)
 Start a sound playing. More...
 
void S_StaticSound (sfx_t *sfx, const vec3_t origin, float vol, float attenuation)
 Create a sound generated by the world. More...
 
void S_StopAllSounds (void)
 Stop all sounds from playing. More...
 
void S_StopSound (int entnum, int entchannel)
 Stop an entity's sound. More...
 
void S_UnblockSound (void)
 Unpause the sound output. More...
 
void S_Update (const vec3_t origin, const vec3_t v_forward, const vec3_t v_right, const vec3_t v_up, const byte *ambient_sound_level)
 Update the sound engine with the client's position and orientation and render some sound. More...
 

Detailed Description

Function Documentation

struct channel_s* S_AllocChannel ( void  )

Allocate a sound channel that can be used for playing sounds.

void S_AmbientOff ( void  )

Disable ambient sounds.

Todo:
not used, remove?
void S_AmbientOn ( void  )

Enable ambient sounds.

Todo:
not used, remove?
void S_BlockSound ( void  )

Pause the sound output.

Nested blocking is supported, so calls to S_BlockSound() and S_UnblockSound() must be balanced.

void S_ChannelStop ( struct channel_s chan)

Stop and safely free a channel.

Parameters
chanchannel to stop
void S_ExtraUpdate ( void  )

Render some more sound without updating the client's position/orientation.

sfx_t* S_LoadSound ( const char *  name)

Pre-load a sound.

Parameters
namename of sound to load
void S_LocalSound ( const char *  s)

Start a sound local to the client view.

Parameters
sname of sound to play
sfx_t* S_PrecacheSound ( const char *  sample)

Pre-load a sound into the cache.

Parameters
samplename of sound to precache
void S_Progs_Init ( struct progs_s pr)
void S_StartSound ( int  entnum,
int  entchannel,
sfx_t sfx,
const vec3_t  origin,
float  fvol,
float  attenuation 
)

Start a sound playing.

Parameters
entnumindex of entity the sound is associated with.
entchannel0-7
  • 0 auto (never willingly overrides)
  • 1 weapon
  • 2 voice
  • 3 item
  • 4 body
sfxsound to play
origin3d coords of where the sound originates
fvolabsolute volume of the sound
attenuationrate of volume dropoff vs distance
void S_StaticSound ( sfx_t sfx,
const vec3_t  origin,
float  vol,
float  attenuation 
)

Create a sound generated by the world.

Parameters
sfxsound to play
origin3d coords of where the sound originates
volabsolute volume of the sound
attenuationrate of volume dropoff vs distance
void S_StopAllSounds ( void  )

Stop all sounds from playing.

void S_StopSound ( int  entnum,
int  entchannel 
)

Stop an entity's sound.

Parameters
entnumindex of entity the sound is associated with.
entchannelchannel to silence
void S_UnblockSound ( void  )

Unpause the sound output.

Nested blocking is supported, so calls to S_BlockSound() and S_UnblockSound() must be balanced.

void S_Update ( const vec3_t  origin,
const vec3_t  v_forward,
const vec3_t  v_right,
const vec3_t  v_up,
const byte ambient_sound_level 
)

Update the sound engine with the client's position and orientation and render some sound.

Parameters
origin3d coords of the client
v_forward3d vector of the client's facing direction
v_right3d vector of the client's rightward direction
v_up3d vector of the client's upward direction
ambient_sound_levelNUM_AMBIENTS bytes indicating current ambient sound levels