Output sound is mixed from an number of active sound channels.
More...
|
struct channel_s * | SND_AllocChannel (void) |
| Allocate a sound channel that can be used for playing sounds. More...
|
|
void | SND_AmbientOff (void) |
| Disable ambient sounds. More...
|
|
void | SND_AmbientOn (void) |
| Enable ambient sounds. More...
|
|
void | SND_Channels_Init (void) |
| Initialize the channels sub-subsystem. More...
|
|
void | SND_ChannelStop (channel_t *chan) |
| Stop a channel from playing. More...
|
|
void | SND_LocalSound (const char *s) |
| Start a sound local to the client view. More...
|
|
void | SND_ScanChannels (int wait) |
| Scan channels looking for stopped channels. More...
|
|
void | SND_SetListener (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...
|
|
void | SND_StartSound (int entnum, int entchannel, sfx_t *sfx, const vec3_t origin, float fvol, float attenuation) |
| Start a sound playing. More...
|
|
void | SND_StaticSound (sfx_t *sfx, const vec3_t origin, float vol, float attenuation) |
| Create a sound generated by the world. More...
|
|
void | SND_StopAllSounds (void) |
| Stop all sounds from playing. More...
|
|
void | SND_StopSound (int entnum, int entchannel) |
| Stop an entity's sound. More...
|
|
Output sound is mixed from an number of active sound channels.
- 0 to MAX_DYNAMIC_CHANNELS-1
normal entity sounds
- MAX_DYNAMIC_CHANNELS to MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS -1
water, etc
- MAX_DYNAMIC_CHANNELS + NUM_AMBIENTS to total_channels - 1
static sounds
number of available mixing channels
#define MAX_DYNAMIC_CHANNELS 128 |
number of dynamic channels
#define MAX_STATIC_CHANNELS 256 |
number of static channels
Allocate a sound channel that can be used for playing sounds.
void SND_AmbientOff |
( |
void |
| ) |
|
Disable ambient sounds.
- Todo:
- not used, remove?
void SND_AmbientOn |
( |
void |
| ) |
|
Enable ambient sounds.
- Todo:
- not used, remove?
void SND_Channels_Init |
( |
void |
| ) |
|
Initialize the channels sub-subsystem.
Stop a channel from playing.
- Parameters
-
void SND_LocalSound |
( |
const char * |
s | ) |
|
Start a sound local to the client view.
- Parameters
-
void SND_ScanChannels |
( |
int |
wait | ) |
|
Scan channels looking for stopped channels.
- Parameters
-
wait | if true, wait for the channels to be done. if false, force the channels to be done. true is for threaded, false for non-threaded. |
Update the sound engine with the client's position and orientation and render some sound.
- Parameters
-
origin | 3d coords of the client |
v_forward | 3d vector of the client's facing direction |
v_right | 3d vector of the client's rightward direction |
v_up | 3d vector of the client's upward direction |
ambient_sound_level | Pointer to 4 bytes indicating the levels at which to play the ambient sounds. |
void SND_StartSound |
( |
int |
entnum, |
|
|
int |
entchannel, |
|
|
sfx_t * |
sfx, |
|
|
const vec3_t |
origin, |
|
|
float |
fvol, |
|
|
float |
attenuation |
|
) |
| |
Start a sound playing.
- Parameters
-
entnum | index of entity the sound is associated with. |
entchannel | 0-7
- 0 auto (never willingly overrides)
- 1 weapon
- 2 voice
- 3 item
- 4 body
|
sfx | sound to play |
origin | 3d coords of where the sound originates |
fvol | absolute volume of the sound |
attenuation | rate of volume dropoff vs distance |
void SND_StaticSound |
( |
sfx_t * |
sfx, |
|
|
const vec3_t |
origin, |
|
|
float |
vol, |
|
|
float |
attenuation |
|
) |
| |
Create a sound generated by the world.
- Parameters
-
sfx | sound to play |
origin | 3d coords of where the sound originates |
vol | absolute volume of the sound |
attenuation | rate of volume dropoff vs distance |
void SND_StopAllSounds |
( |
void |
| ) |
|
Stop all sounds from playing.
void SND_StopSound |
( |
int |
entnum, |
|
|
int |
entchannel |
|
) |
| |
Stop an entity's sound.
- Parameters
-
entnum | index of entity the sound is associated with. |
entchannel | channel to silence |
pool of available channels
number of active channels