UFO: Alien Invasion
Loading...
Searching...
No Matches
s_main.h
Go to the documentation of this file.
1
5
6/*
7All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9Original file from Quake 2 v3.21: quake2-2.31/client/sound.h
10Copyright (C) 1997-2001 Id Software, Inc.
11
12This program is free software; you can redistribute it and/or
13modify it under the terms of the GNU General Public License
14as published by the Free Software Foundation; either version 2
15of the License, or (at your option) any later version.
16
17This program is distributed in the hope that it will be useful,
18but WITHOUT ANY WARRANTY; without even the implied warranty of
19MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
20
21See the GNU General Public License for more details.
22
23You should have received a copy of the GNU General Public License
24along with this program; if not, write to the Free Software
25Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
26
27*/
28
29#pragma once
30
31#include "../../shared/mathlib.h" /* for vec3_t */
32
41
42#define SND_VOLUME_DEFAULT 1.0f
43#define SND_VOLUME_WEAPONS 1.0f
44
45void S_Init(void);
46void S_Shutdown(void);
47void S_Frame(void);
48void S_Stop(void);
49void S_PlayStdSample(const stdsound_t sId, const vec3_t origin, float atten, float volume);
50void S_StartLocalSample(const char* s, float volume);
51int S_LoadSampleIdx (const char* soundFile);
52bool S_LoadAndPlaySample(const char* s, const vec3_t origin, float atten, float volume);
53void S_SetSampleRepeatRate(int sampleRepeatRate);
54void S_LoadSamples(void);
voidpf uLong int origin
Definition ioapi.h:45
void S_LoadSamples(void)
Wrapper for S_PrecacheSamples to avoid exposing it via s_sample.h.
Definition s_main.cpp:352
void S_Stop(void)
Stop all channels.
Definition s_main.cpp:58
int S_LoadSampleIdx(const char *soundFile)
Loads and registers a sound file for later use.
Definition s_sample.cpp:105
void S_StartLocalSample(const char *s, float volume)
Plays a sample without spatialization.
Definition s_mix.cpp:184
stdsound_t
These sounds are precached in S_LoadSamples.
Definition s_main.h:34
@ SOUND_WATER_IN
Definition s_main.h:35
@ MAX_SOUNDIDS
Definition s_main.h:39
@ SOUND_WATER_OUT
Definition s_main.h:36
@ SOUND_WATER_MOVE
Definition s_main.h:37
void S_PlayStdSample(const stdsound_t sId, const vec3_t origin, float atten, float volume)
plays one of the precached samples
Definition s_main.cpp:326
bool S_LoadAndPlaySample(const char *s, const vec3_t origin, float atten, float volume)
does what the name implies in just one function to avoid exposing s_sample_t
Definition s_main.cpp:307
void S_Frame(void)
Definition s_main.cpp:70
void S_SetSampleRepeatRate(int sampleRepeatRate)
Controls the repeat rate for the same sample.
Definition s_main.cpp:345
void S_Shutdown(void)
Definition s_main.cpp:268
void S_Init(void)
Definition s_main.cpp:172
vec_t vec3_t[3]
Definition ufotypes.h:39