26 #include "../cl_shared.h"
27 #include "../cl_renderer.h"
28 #include "../cl_video.h"
29 #include "../battlescape/cl_camera.h"
30 #include "../battlescape/cl_localentity.h"
31 #include "../battlescape/cl_battlescape.h"
79 angle = (
int)(450.0 - acos(dot) *
todeg) % 360;
83 Mix_SetPosition(c, (
int)angle, (
int)dist);
119 if (origin !=
nullptr) {
136 if (!sample || !sample->
chunk)
166 ch->
atten = attenuation;
191 Com_Printf(
"S_StartLocalSample: Failed to load %s\n", name);
void VectorMix(const vec3_t v1, const vec3_t v2, float mix, vec3_t out)
Calculate a position on v1 v2 line.
vec_t VectorLength(const vec3_t v)
Calculate the length of a vector.
#define VectorCopy(src, dest)
void S_PlaySample(const vec3_t origin, s_sample_t *sample, float atten, float relVolume)
Validates the parms and queues the sound up.
void S_StartLocalSample(const char *name, float relVolume)
Plays a sample without spatialization.
s_sample_t * S_LoadSample(const char *soundFile)
Loads and registers a sound file for later use.
void S_LoopSample(const vec3_t org, s_sample_t *sample, float relVolume, float attenuation)
Adds a loop sample for e.g. ambient sounds.
cvar_t * snd_distance_scale
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
void Com_Printf(const char *const fmt,...)
s_channel_t channels[MAX_CHANNELS]
#define DotProduct(x, y)
Returns the distance between two 3-dimensional vectors.
void Com_DPrintf(int level, const char *fmt,...)
A Com_Printf that only shows up if the "developer" cvar is set.
void S_SpatializeChannel(const s_channel_t *ch)
Set distance and stereo panning for the specified channel.
vec_t VectorNormalize(vec3_t v)
Calculate unit vector for a given vec3_t.
QGL_EXTERN GLuint GLsizei GLsizei GLint GLenum GLchar * name
static int S_AllocChannel(void)
Searches a channel with no sample applied yet.
#define MAX_CHANNELS
the sound environment
void S_FreeChannel(int c)
Callback that is called when a channel finished playing.
#define VectorSubtract(a, b, dest)
int CL_Milliseconds(void)