26#define MAXSOUNDCHANNELS 8
30#define ssamplepos_t qintptr_t
31#define usamplepos_t quintptr_t
38 float (QDECL *querydata) (
struct sfx_s *sfx,
struct sfxcache_s *
buf,
char *title,
size_t titlesize);
75#define QAF_BYTES(v) (v&0x7f)
111#define CF_SV_RELIABLE 1
112#define CF_NET_SENTVELOCITY CF_SV_RELIABLE
113#define CF_FORCELOOP 2
114#define CF_NOSPACIALISE 4
116#define CF_CL_ABSVOLUME 16
118#define CF_NOREVERB 32
120#define CF_NOREPLACE 128
122#define CF_SV_UNICAST 256
123#define CF_SV_SENDVELOCITY 512
124#define CF_CLI_AUTOSOUND 1024
125#define CF_CLI_INACTIVE 2048
127#define CF_CLI_NODUPES 4096
129#define CF_CLI_STATIC 8192
130#define CF_NETWORKED (CF_NOSPACIALISE|CF_NOREVERB|CF_FORCELOOP|CF_FOLLOW|CF_NOREPLACE)
135 int vol[MAXSOUNDCHANNELS];
188#define REVERB_PRESET_PSYCHOTIC \
189 { 0.0625f, 0.5000f, 0.3162f, 0.8404f, 1.0000f, 7.5600f, 0.9100f, 1.0000f, 0.4864f, 0.0200f, { 0.0000f, 0.0000f, 0.0000f }, 2.4378f, 0.0300f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 4.0000f, 1.0000f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x0 }
191#define REVERB_PRESET_UNDERWATER \
192 { 0.3645f, 1.0000f, 0.3162f, 0.0100f, 1.0000f, 1.4900f, 0.1000f, 1.0000f, 0.5963f, 0.0070f, { 0.0000f, 0.0000f, 0.0000f }, 7.0795f, 0.0110f, { 0.0000f, 0.0000f, 0.0000f }, 0.2500f, 0.0000f, 1.1800f, 0.3480f, 0.9943f, 5000.0000f, 250.0000f, 0.0000f, 0x1 }
227#define S_PrecacheSound(s) S_PrecacheSound2(s,false)
242#ifdef PEXT2_VOICECHAT
254#define S_Voip_Loudness() -1
255#define S_Voip_Speaking(p) false
256#define S_Voip_Ignore(p,s)
287#define AMBIENT_FIRST 0
288#define AMBIENT_STOP NUM_AMBIENTS
289#define MUSIC_FIRST AMBIENT_STOP
290#define MUSIC_STOP (MUSIC_FIRST + NUM_MUSICS)
291#define DYNAMIC_FIRST MUSIC_STOP
412 void *(QDECL *
Init) (
int samplerate,
const char *device);
414 unsigned int (QDECL *Update) (
void *
ctx,
unsigned char *
buffer,
unsigned int minbytes,
unsigned int maxbytes);
unsigned int width
Definition: bymorphed.h:4
double time
Definition: cl_main.c:306
void(QDECL *vgui_frame)(void)
void dNearCallback * callback
Definition: com_phys_ode.c:655
unsigned char qbyte
Definition: common.h:127
s
Definition: execloop.h:53
static EGLSurface EGLSurface EGLContext ctx
Definition: gl_videgl.c:47
static CONST PIXELFORMATDESCRIPTOR *static int
Definition: gl_vidnt.c:222
GLsizei const GLcharARB const GLint * length
Definition: glquake.h:149
GLuint GLcharARB * name
Definition: glquake.h:155
void * module
Definition: image.c:236
static png_size_t start
Definition: image.c:1419
char ** data
Definition: p_script.c:63
vec3_t forward
Definition: pmove.c:33
vec3_t right
Definition: pmove.c:33
vec3_t up
Definition: pmove.c:33
vec3_t end
Definition: r_d3.c:692
static ALC_API ALCvoid ALCsizei samples
Definition: snd_al.c:259
static AL_API ALenum const ALvoid ALsizei ALsizei freq
Definition: snd_al.c:144
static ALC_API ALCvoid * buffer
Definition: snd_al.c:259
const char const char * readablename
Definition: snd_directx.c:1079
static spx_int16_t * in
Definition: snd_dma.c:488
static SpeexBits spx_int16_t * out
Definition: snd_dma.c:492
@ SLS_FAILED
Definition: sound.h:49
@ SLS_NOTLOADED
Definition: sound.h:46
@ SLS_LOADING
Definition: sound.h:47
@ SLS_LOADED
Definition: sound.h:48
qboolean S_GetMusicInfo(int musicchannel, float *time, float *duration, char *title, size_t titlesize)
Definition: snd_dma.c:3085
void S_LocalSound2(const char *sound, int channel, float volume)
Definition: snd_dma.c:4168
void S_AmbientOff(void)
Definition: snd_dma.c:205
void S_UpdateListener(int seat, int entnum, vec3_t origin, vec3_t forward, vec3_t right, vec3_t up, size_t reverbtype, vec3_t velocity)
Definition: snd_dma.c:3643
void S_PaintChannels(soundcardinfo_t *sc, int endtime)
Definition: snd_mix.c:212
qboolean S_Voip_Speaking(unsigned int plno)
Definition: snd_dma.c:1727
size_t numreverbproperties
Definition: snd_dma.c:3601
void S_MixerThread(soundcardinfo_t *sc)
Definition: snd_dma.c:4058
void S_Restart_f(void)
Definition: snd_dma.c:2197
cvar_t snd_mixerthread
Definition: snd_dma.c:156
cvar_t nosound
Definition: snd_dma.c:88
void S_DefaultSpeakerConfiguration(soundcardinfo_t *sc)
Definition: snd_dma.c:1777
void S_Purge(qboolean retaintouched)
Definition: snd_dma.c:2508
void S_ResetFailedLoad(void)
Definition: snd_dma.c:2563
void S_Voip_Transmit(unsigned char clc, sizebuf_t *buf)
Definition: snd_dma.c:1149
struct sfxcache_s sfxcache_t
void S_StaticSound(sfx_t *sfx, vec3_t origin, float vol, float attenuation)
Definition: snd_dma.c:3338
cvar_t bgmvolume
Definition: snd_dma.c:83
qboolean snd_initialized
Definition: snd_dma.c:56
qboolean S_UpdateReverb(size_t reverbtype, void *reverb, size_t reverbsize)
Definition: snd_dma.c:3602
int S_Voip_Loudness(qboolean ignorevad)
Definition: snd_dma.c:1711
qaudiofmt_t
Definition: sound.h:64
@ QAF_S16
Definition: sound.h:70
@ QAF_BLOB
Definition: sound.h:66
@ QAF_S8
Definition: sound.h:68
@ QAF_F32
Definition: sound.h:73
chanupdatereason_t
Definition: sound.h:348
@ CUR_OFFSET
Definition: sound.h:352
@ CUR_SPACIALISEONLY
Definition: sound.h:349
@ CUR_SOUNDCHANGE
Definition: sound.h:351
@ CUR_UPDATE
Definition: sound.h:350
@ CUR_EVERYTHING
Definition: sound.h:353
void S_UntouchAll(void)
Definition: snd_dma.c:2573
float S_UpdateSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, vec3_t velocity, float fvol, float attenuation, float timeofs, float pitchadj, unsigned int flags)
Definition: snd_dma.c:2986
int S_Voip_ClientLoudness(unsigned int plno)
Definition: snd_dma.c:1719
soundcardinfo_t * sndcardinfo
Definition: snd_dma.c:52
void S_Startup(void)
Definition: snd_dma.c:2109
channel_t * SND_PickChannel(soundcardinfo_t *sc, int entnum, int entchannel)
Definition: snd_dma.c:2610
void S_GetListenerInfo(int seat, float *origin, float *forward, float *right, float *up)
Definition: snd_dma.c:3658
void S_InitPaintChannels(soundcardinfo_t *sc)
void S_Voip_MapChange(void)
Definition: snd_dma.c:1706
int snd_speed
Definition: snd_dma.c:57
void S_Voip_Ignore(unsigned int plno, qboolean ignore)
Definition: snd_dma.c:1667
sfx_t * S_PrecacheSound2(const char *sample, qboolean syspath)
Definition: snd_dma.c:2586
qboolean(QDECL * S_LoadSound_t)(sfx_t *s, qbyte *data, size_t datalen, int sndspeed, qboolean forcedecode)
Definition: sound.h:320
float S_GetChannelLevel(int entnum, int entchannel)
Definition: snd_dma.c:3152
void S_UnregisterSoundInputModule(void *module)
Definition: snd_mem.c:880
void S_LockMixer(void)
Definition: snd_dma.c:188
void S_Music_Clear(sfx_t *onlyifsample)
Definition: snd_dma.c:3386
cvar_t snd_nominaldistance
Definition: snd_dma.c:69
void SND_ResampleStream(void *in, int inrate, qaudiofmt_t inwidth, int inchannels, int insamps, void *out, int outrate, qaudiofmt_t outwidth, int outchannels, int resampstyle)
Definition: snd_mem.c:298
void S_Voip_Parse(void)
Definition: snd_dma.c:1039
soundcardinfo_t * S_SetupDeviceSeat(char *driver, char *device, int seat)
Definition: snd_dma.c:2026
void S_StopAllSounds(qboolean clear)
Definition: snd_dma.c:3256
float voicevolumemod
Definition: snd_dma.c:58
void S_RawAudio(int sourceid, qbyte *data, int speed, int samples, int channels, qaudiofmt_t width, float volume)
Definition: snd_dma.c:4255
cvar_t mastervolume
Definition: sound.h:305
void S_UnlockMixer(void)
Definition: snd_dma.c:192
int snd_blocked
Definition: snd_dma.c:54
qboolean S_LoadSound(sfx_t *s, qboolean forcedecode)
Definition: snd_mem.c:1038
void S_Init(void)
Definition: snd_dma.c:2299
qboolean S_HaveOutput(void)
Definition: snd_dma.c:216
void S_Music_Seek(float time)
Definition: snd_dma.c:3414
void S_BeginPrecaching(void)
void SNDVC_MicInput(qbyte *buffer, int samples, int freq, int width)
sfx_t * S_FindName(const char *name, qboolean create, qboolean syspath)
Definition: snd_dma.c:2471
void S_ShutdownCard(soundcardinfo_t *sc)
Definition: snd_dma.c:2402
void S_ExtraUpdate(void)
Definition: snd_dma.c:3968
void S_EndPrecaching(void)
float Media_CrossFade(int musicchanel, float vol, float time)
Definition: m_mp3.c:299
void S_EnumerateDevices(void)
Definition: snd_dma.c:2069
void S_StopSound(int entnum, int entchannel)
Definition: snd_dma.c:3247
qboolean S_RegisterSoundInputPlugin(void *module, S_LoadSound_t loadfnc)
Definition: snd_mem.c:866
void S_Shutdown(qboolean final)
Definition: snd_dma.c:2419
qboolean S_IsPlayingSomewhere(sfx_t *s)
Definition: snd_dma.c:3216
void S_StartSound(int entnum, int entchannel, sfx_t *sfx, vec3_t origin, vec3_t velocity, float fvol, float attenuation, float timeofs, float pitchadj, unsigned int flags)
Definition: snd_dma.c:3024
void S_AmbientOn(void)
Definition: snd_dma.c:211
void S_DoRestart(qboolean onlyifneeded)
Definition: snd_dma.c:2172
void S_Update(void)
Definition: snd_dma.c:3957
sfx_t * Media_NextTrack(int musicchanel, float *time)
Definition: m_mp3.c:178
cvar_t snd_loadas8bit
Definition: snd_dma.c:92
float S_GetSoundTime(int entnum, int entchannel)
Definition: snd_dma.c:3128
qboolean S_Music_Playing(int musicchannel)
Definition: snd_dma.c:3434
void S_LocalSound(const char *s)
Definition: snd_dma.c:4185
void S_ClearPrecache(void)
cvar_t volume
Definition: snd_dma.c:85
struct sndreverbproperties_s * reverbproperties
cvar_t snd_voip_showmeter
Definition: snd_dma.c:172
vec_t dist_mult
Definition: sound.h:143
unsigned int starttime
Definition: sound.h:146
ssamplepos_t pos
Definition: sound.h:136
int entchannel
Definition: sound.h:140
int rate
Definition: sound.h:137
vec3_t origin
Definition: sound.h:141
int flags
Definition: sound.h:138
sfx_t * sfx
Definition: sound.h:134
int master_vol
Definition: sound.h:144
vec3_t velocity
Definition: sound.h:142
int entnum
Definition: sound.h:139
int samplepos
Definition: sound.h:93
@ QSF_F32
Definition: sound.h:104
@ QSF_EXTERNALMIXER
Definition: sound.h:98
@ QSF_INVALID
Definition: sound.h:97
@ QSF_S8
Definition: sound.h:100
@ QSF_S16
Definition: sound.h:101
@ QSF_U8
Definition: sound.h:99
int samplebytes
Definition: sound.h:94
unsigned char * buffer
Definition: sound.h:107
int samples
Definition: sound.h:92
int speed
Definition: sound.h:106
int numchannels
Definition: sound.h:91
int loopstart
Definition: sound.h:60
sfxdecode_t decoder
Definition: sound.h:54
qboolean touched
Definition: sound.h:57
qboolean syspath
Definition: sound.h:58
int loadstate
Definition: sound.h:56
usamplepos_t length
Definition: sound.h:81
unsigned int numchannels
Definition: sound.h:84
usamplepos_t soundoffset
Definition: sound.h:85
qbyte * data
Definition: sound.h:86
qaudiofmt_t format
Definition: sound.h:83
unsigned int speed
Definition: sound.h:82
void * buf
Definition: sound.h:41
struct sfxcache_s *QDECL * decodedata(struct sfx_s *sfx, struct sfxcache_s *buf, ssamplepos_t start, int length)
struct sfxcache_s * buf
Definition: sound.h:38
void(QDECL *purge)(struct sfx_s *sfx)
void(QDECL *ended)(struct sfx_s *sfx)
void(QDECL *Stop)(void *ctx)
unsigned unsigned char * buffer
Definition: sound.h:414
const char * devicecode
Definition: sound.h:411
void(QDECL *Shutdown)(void *ctx)
char * drivername
Definition: sound.h:410
void *QDECL * Init(int samplerate, const char *device)
int apiver
Definition: sound.h:409
void(QDECL *Start)(void *ctx)
float flGainHF
Definition: sound.h:162
float flLFReference
Definition: sound.h:179
float flReflectionsDelay
Definition: sound.h:168
float flGain
Definition: sound.h:161
float flDiffusion
Definition: sound.h:160
float flRoomRolloffFactor
Definition: sound.h:180
float flDecayLFRatio
Definition: sound.h:166
float flDecayHFRatio
Definition: sound.h:165
float flEchoDepth
Definition: sound.h:174
float flLateReverbPan[3]
Definition: sound.h:172
float flGainLF
Definition: sound.h:163
float flModulationDepth
Definition: sound.h:176
float flDensity
Definition: sound.h:159
float flModulationTime
Definition: sound.h:175
float flDecayTime
Definition: sound.h:164
float flLateReverbGain
Definition: sound.h:170
float flAirAbsorptionGainHF
Definition: sound.h:177
float flEchoTime
Definition: sound.h:173
int iDecayHFLimit
Definition: sound.h:181
float flHFReference
Definition: sound.h:178
float flReflectionsPan[3]
Definition: sound.h:169
float flLateReverbDelay
Definition: sound.h:171
float flReflectionsGain
Definition: sound.h:167
struct sndreverbproperties_s::reverbproperties_s props
int modificationcount
Definition: sound.h:155
void * thread
Definition: sound.h:398
float ambientlevels[NUM_AMBIENTS]
Definition: sound.h:373
int snd_completed
Definition: sound.h:401
int samplequeue
Definition: sound.h:383
struct soundcardinfo_s * next
Definition: sound.h:359
int oldsamplepos
Definition: sound.h:381
void(* SetEnvironmentReverb)(soundcardinfo_t *sc, size_t reverb)
Definition: sound.h:391
size_t total_chans
Definition: sound.h:370
int buffers
Definition: sound.h:382
void(* ListenerUpdate)(soundcardinfo_t *sc, int entnum, vec3_t origin, vec3_t forward, vec3_t right, vec3_t up, vec3_t velocity)
Definition: sound.h:394
void * handle
Definition: sound.h:399
vec3_t speakerdir[MAXSOUNDCHANNELS]
Definition: sound.h:365
float dist[MAXSOUNDCHANNELS]
Definition: sound.h:363
void(* Unlock)(soundcardinfo_t *sc, void *buffer)
Definition: sound.h:387
int seat
Definition: sound.h:360
char guid[256]
Definition: sound.h:358
ssamplepos_t(* GetChannelPos)(soundcardinfo_t *sc, channel_t *channel)
Definition: sound.h:395
qboolean selfpainting
Definition: sound.h:378
void(* Restore)(soundcardinfo_t *sc)
Definition: sound.h:392
volatile dma_t sn
Definition: sound.h:376
int audio_fd
Definition: sound.h:402
int paintedtime
Definition: sound.h:380
size_t max_chans
Definition: sound.h:371
void(* Shutdown)(soundcardinfo_t *sc)
Definition: sound.h:389
void(* ChannelUpdate)(soundcardinfo_t *sc, channel_t *channel, chanupdatereason_t schanged)
Definition: sound.h:393
qboolean inactive_sound
Definition: sound.h:377
unsigned int(* GetDMAPos)(soundcardinfo_t *sc)
Definition: sound.h:390
channel_t * channel
Definition: sound.h:369
void(* Submit)(soundcardinfo_t *sc, int start, int end)
Definition: sound.h:388
int snd_sent
Definition: sound.h:400
const char * devicecode
Definition: sound.h:333
const char * cardname
Definition: sound.h:332
void(QDECL *RegisterCvars)(void)
const char * name
Definition: sound.h:331
unsigned int datalen
Definition: sv_user.c:2880
unsigned char buf[KBRINGSIZE]
Definition: sys_dos.c:27
unsigned int flags
Definition: valid.c:313