UFO: Alien Invasion
|
#include "s_local.h"
Go to the source code of this file.
Functions | |
void | S_PrecacheSamples (void) |
void | S_FreeSamples (void) |
s_sample_t * | S_LoadSample (const char *s) |
Loads and registers a sound file for later use. More... | |
s_sample_t * | S_GetSample (const int soundIdx) |
void | S_PlaySample (const vec3_t origin, s_sample_t *sample, float atten, float volume) |
Validates the parms and queues the sound up. More... | |
Definition at line 139 of file s_sample.cpp.
References s_sample_s::hashNext, i, Mem_Free, OBJZERO, and SAMPLE_HASH_SIZE.
Referenced by S_Shutdown().
s_sample_t* S_GetSample | ( | const int | soundIdx | ) |
Definition at line 132 of file s_sample.cpp.
References sampleIndexLast.
Referenced by S_Frame(), and S_LoadSample().
s_sample_t* S_LoadSample | ( | const char * | soundFile | ) |
Loads and registers a sound file for later use.
[in] | soundFile | The name of the soundfile, relative to the sounds dir |
Definition at line 342 of file s_main.cpp.
References S_GetSample(), and S_LoadSampleIdx().
Referenced by S_LoadAndPlaySample(), S_PrecacheSamples(), and S_StartLocalSample().
void S_PlaySample | ( | const vec3_t | origin, |
s_sample_t * | sample, | ||
float | atten, | ||
float | relVolume | ||
) |
Validates the parms and queues the sound up.
[in] | origin | if this is nullptr , the sound will be dynamically sourced from the entity |
[in] | sample | The soundfile to play |
[in] | atten | Attenuation of sound to be played (for example, fireAttenuation or impactAttenuation from fireDef_s ). |
[in] | relVolume | Max mixer volume factor (0.0 - 1.0) |
Definition at line 96 of file s_mix.cpp.
References s_channel_s::atten, s_env_s::channels, s_sample_s::chunk, CL_Milliseconds(), Com_DPrintf(), DEBUG_SOUND, s_env_s::initialized, s_sample_s::lastPlayed, s_sample_s::name, s_channel_s::org, S_AllocChannel(), s_env, S_SpatializeChannel(), s_channel_s::sample, s_env_s::sampleRepeatRate, snd_volume, cvar_s::value, and VectorCopy.
Referenced by S_LoadAndPlaySample(), S_PlayStdSample(), and S_StartLocalSample().
Definition at line 163 of file s_sample.cpp.
References fireDef_s::bounceSound, csi, objDef_s::fd, fireDef_s::fireSound, fireDef_s::hitBodySound, i, fireDef_s::impactSound, s_env_s::initialized, INVSH_GetItemByIDX(), objDef_s::numFiredefs, csi_s::numODs, objDef_s::numWeapons, s_env, S_LoadSample(), SOUND_WATER_IN, SOUND_WATER_MOVE, and SOUND_WATER_OUT.
Referenced by S_LoadSamples().