|
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. | |
| 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. | |
Definition at line 139 of file s_sample.cpp.
References s_sample_t::hashNext, i, Mem_Free, OBJZERO, SAMPLE_HASH_SIZE, sampleHash, and sampleIndex.
Referenced by S_Shutdown().
| s_sample_t * S_GetSample | ( | const int | soundIdx | ) |
Definition at line 132 of file s_sample.cpp.
References sampleIndex, and 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 335 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_t::atten, s_sample_t::chunk, CL_Milliseconds(), Com_DPrintf(), DEBUG_SOUND, s_sample_t::lastPlayed, s_sample_t::name, s_channel_t::org, S_AllocChannel(), s_env, S_SpatializeChannel(), s_channel_t::sample, snd_volume, and VectorCopy.
Referenced by S_LoadAndPlaySample(), S_PlayStdSample(), and S_StartLocalSample().
Definition at line 163 of file s_sample.cpp.
References fireDef_t::bounceSound, csi, objDef_t::fd, fireDef_t::fireSound, fireDef_t::hitBodySound, i, fireDef_t::impactSound, INVSH_GetItemByIDX(), objDef_t::numFiredefs, objDef_t::numWeapons, s_env, S_LoadSample(), SOUND_WATER_IN, SOUND_WATER_MOVE, SOUND_WATER_OUT, and stdSoundPool.
Referenced by S_LoadSamples().