UFO: Alien Invasion
s_mix.h File Reference

Specifies sound API? More...

#include "s_local.h"
Include dependency graph for s_mix.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void S_FreeChannel (int c)
 Callback that is called when a channel finished playing. More...
 
void S_SpatializeChannel (const s_channel_t *ch)
 Set distance and stereo panning for the specified channel. More...
 
void S_LoopSample (const vec3_t org, s_sample_t *sample, float volume, float attenuation)
 Adds a loop sample for e.g. ambient sounds. More...
 

Detailed Description

Specifies sound API?

Definition in file s_mix.h.

Function Documentation

◆ S_FreeChannel()

void S_FreeChannel ( int  c)

Callback that is called when a channel finished playing.

Parameters
cThe channel id

Definition at line 55 of file s_mix.cpp.

References s_env_t::channels, OBJZERO, and s_env.

Referenced by S_Init().

◆ S_LoopSample()

void S_LoopSample ( const vec3_t  org,
s_sample_t sample,
float  volume,
float  attenuation 
)

◆ S_SpatializeChannel()

void S_SpatializeChannel ( const s_channel_t ch)

Set distance and stereo panning for the specified channel.

Parameters
[in]chThe channel to perform the spatialization for.

Definition at line 64 of file s_mix.cpp.

References s_channel_t::atten, clientBattleScape_t::cam, camera_t::camorg, s_env_t::channels, cl, DotProduct, int(), s_channel_t::org, s_env_t::right, s_env, snd_distance_scale, todeg, cvar_t::value, VectorNormalize(), and VectorSubtract.

Referenced by S_Frame(), S_LoopSample(), and S_PlaySample().