Specifies sound API? More...
Go to the source code of this file.
Functions | |
void | S_FreeChannel (int c) |
Callback that is called when a channel finished playing. | |
void | S_SpatializeChannel (const s_channel_t *ch) |
Set distance and stereo panning for the specified channel. | |
void | S_LoopSample (const vec3_t org, s_sample_t *sample, float volume, float attenuation) |
Adds a loop sample for e.g. ambient sounds. |
Specifies sound API?
Definition in file s_mix.h.
void S_FreeChannel | ( | int | c | ) |
Callback that is called when a channel finished playing.
c | The channel id |
Definition at line 50 of file s_mix.c.
References s_env_s::channels, and s_env.
Referenced by S_Init().
void S_LoopSample | ( | const vec3_t | org, | |
s_sample_t * | sample, | |||
float | volume, | |||
float | attenuation | |||
) |
Adds a loop sample for e.g. ambient sounds.
Definition at line 131 of file s_mix.c.
References s_channel_s::atten, s_env_s::channels, s_sample_s::chunk, CL_Milliseconds(), s_channel_s::count, i, s_sample_s::lastPlayed, MAX_CHANNELS, s_channel_s::org, S_AllocChannel(), s_env, S_SpatializeChannel(), s_channel_s::sample, VectorCopy, VectorLength(), VectorMix(), and VectorSubtract.
Referenced by S_Frame().
void S_SpatializeChannel | ( | const s_channel_t * | ch | ) |
Set distance and stereo panning for the specified channel.
[in] | ch | The channel to perform the spatialization for. |
Definition at line 59 of file s_mix.c.
References s_channel_s::atten, s_env_s::channels, cl, DotProduct, int(), s_channel_s::org, s_env_s::right, s_env, snd_distance_scale, todeg, cvar_s::value, VectorNormalize(), and VectorSubtract.
Referenced by S_Frame(), S_LoopSample(), and S_PlaySample().