Main control for any streaming sound output device. More...
#include "s_local.h"
#include "s_main.h"
#include "s_music.h"
#include "s_sample.h"
#include "s_mix.h"
Go to the source code of this file.
Defines | |
#define | COMPARE_VERSION(major, minor, micro) |
Functions | |
static void | S_Restart_f (void) |
Restart the sound subsystem so it can pick up new parameters and flush all sounds. | |
void | S_Stop (void) |
Stop all channels. | |
void | S_Frame (void) |
static void | S_Play_f (void) |
Plays sound fx files via console. | |
static int | S_CompleteSounds (const char *partial, const char **match) |
void | S_Init (void) |
void | S_Shutdown (void) |
Variables | |
s_env_t | s_env |
cvar_t * | snd_volume |
cvar_t * | snd_distance_scale |
static cvar_t * | snd_init |
static cvar_t * | snd_rate |
Main control for any streaming sound output device.
Definition in file s_main.c.
#define COMPARE_VERSION | ( | major, | |||
minor, | |||||
micro | ) |
static int S_CompleteSounds | ( | const char * | partial, | |
const char ** | match | |||
) | [static] |
Definition at line 144 of file s_main.c.
References Cmd_GenericCompleteFunction(), Com_Printf(), Com_sprintf(), FS_BuildFileList(), FS_NextFileFromFileList(), len, MAX_COMPLETE, MAX_OSPATH, and SAMPLE_TYPES.
Referenced by S_Init().
void S_Frame | ( | void | ) |
Definition at line 62 of file s_main.c.
References AngleVectors(), le_s::attenuation, s_env_s::channels, cl, CL_OnBattlescape(), s_channel_s::count, ET_SOUND, i, s_env_s::initialized, LE_GetNextInUse(), M_Frame(), MAX_CHANNELS, cvar_s::modified, le_s::origin, qfalse, s_env_s::right, S_LoopSample(), S_Restart_f(), S_SpatializeChannel(), le_s::sample, s_channel_s::sample, le_s::type, and le_s::volume.
Referenced by CL_Frame(), and CL_InitAfter().
void S_Init | ( | void | ) |
Definition at line 185 of file s_main.c.
References Cmd_AddCommand(), Cmd_AddParamCompleteFunction(), Cmd_Dummy_f(), Com_Printf(), CVAR_ARCHIVE, Cvar_Get(), s_env_s::format, s_env_s::initialized, cvar_s::integer, M_Init(), MAX_CHANNELS, MAX_VAR, cvar_s::modified, s_env_s::numChannels, Q_strncpyz(), qfalse, qtrue, s_env_s::rate, S_CompleteSounds(), S_FreeChannel(), S_Play_f(), and S_Restart_f().
Referenced by CL_Init(), and S_Restart_f().
static void S_Play_f | ( | void | ) | [static] |
Plays sound fx files via console.
Definition at line 115 of file s_main.c.
References Cmd_Argc(), Cmd_Argv(), Com_Printf(), i, S_StartLocalSample(), and SND_VOLUME_DEFAULT.
Referenced by S_Init().
static void S_Restart_f | ( | void | ) | [static] |
Restart the sound subsystem so it can pick up new parameters and flush all sounds.
Definition at line 136 of file s_main.c.
References Com_Printf(), S_Init(), S_LoadSamples(), and S_Shutdown().
void S_Shutdown | ( | void | ) |
Definition at line 266 of file s_main.c.
References cl_soundSysPool, Cmd_RemoveCommand(), s_env_s::initialized, M_Shutdown(), Mem_FreeTag, qfalse, S_FreeSamples(), and S_Stop().
Referenced by CL_Shutdown(), and S_Restart_f().
void S_Stop | ( | void | ) |
Stop all channels.
Definition at line 50 of file s_main.c.
References s_env_s::channels, and s_env_s::initialized.
Referenced by CL_Disconnect(), and S_Shutdown().
Definition at line 38 of file s_main.c.
Referenced by M_AddToSampleBuffer(), M_Change_f(), M_RandomTrack_f(), M_Start(), S_AllocChannel(), S_FreeChannel(), S_LoadSample(), S_LoadSamples(), S_LoopSample(), S_PlaySample(), S_SetSampleRepeatRate(), S_SpatializeChannel(), and S_StartLocalSample().
Definition at line 41 of file s_main.c.
Referenced by S_SpatializeChannel().
Definition at line 40 of file s_main.c.
Referenced by S_PlaySample().