UFO: Alien Invasion
s_local.h
Go to the documentation of this file.
1
5
/*
6
All original material Copyright (C) 2002-2022 UFO: Alien Invasion.
7
8
Original file from Quake 2 v3.21: quake2-2.31/client/sound.h
9
Copyright (C) 1997-2001 Id Software, Inc.
10
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20
See the GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26
*/
27
28
#pragma once
29
30
#include <SDL_mixer.h>
31
#include "../../shared/shared.h"
32
#include "../../shared/mathlib.h"
/* for vec3_t */
33
#include "../../common/cvar.h"
/* for cvar_t */
34
#include "../../common/mem.h"
35
36
extern
memPool_t
*
cl_soundSysPool
;
37
39
#define SAMPLE_TYPES { "ogg"
, "wav", nullptr }
40
41
typedef
struct
s_sample_s {
42
char
*
name
;
43
int
lastPlayed
;
45
Mix_Chunk*
chunk
;
46
struct
s_sample_s*
hashNext
;
47
int
index
;
48
}
s_sample_t
;
49
50
typedef
struct
s_channel_s {
51
vec3_t
org
;
52
s_sample_t
*
sample
;
53
float
atten
;
54
int
count
;
55
}
s_channel_t
;
56
58
#define MAX_CHANNELS 64
59
60
typedef
struct
s_env_s {
61
vec3_t
right
;
/* for stereo panning */
62
63
s_channel_t
channels[
MAX_CHANNELS
];
64
65
int
sampleRepeatRate
;
66
int
rate
;
67
int
numChannels
;
68
uint16_t
format
;
69
70
bool
initialized
;
71
}
s_env_t
;
72
73
extern
cvar_t
*
snd_volume
;
74
extern
cvar_t
*
snd_distance_scale
;
75
76
extern
s_env_t
s_env
;
cl_soundSysPool
memPool_t * cl_soundSysPool
Definition:
s_main.cpp:48
snd_volume
cvar_t * snd_volume
Definition:
s_main.cpp:42
MAX_CHANNELS
#define MAX_CHANNELS
the sound environment
Definition:
s_local.h:58
snd_distance_scale
cvar_t * snd_distance_scale
Definition:
s_main.cpp:43
s_env
s_env_t s_env
Definition:
s_main.cpp:40
cvar_t
This is a cvar definition. Cvars can be user modified and used in our menus e.g.
Definition:
cvar.h:71
memPool_t
Definition:
mem.cpp:55
s_channel_t
Definition:
s_local.h:50
s_channel_t::sample
s_sample_t * sample
Definition:
s_local.h:52
s_channel_t::count
int count
Definition:
s_local.h:54
s_channel_t::atten
float atten
Definition:
s_local.h:53
s_channel_t::org
vec3_t org
Definition:
s_local.h:51
s_env_t
Definition:
s_local.h:60
s_env_t::initialized
bool initialized
Definition:
s_local.h:70
s_env_t::right
vec3_t right
Definition:
s_local.h:61
s_env_t::rate
int rate
Definition:
s_local.h:66
s_env_t::format
uint16_t format
Definition:
s_local.h:68
s_env_t::numChannels
int numChannels
Definition:
s_local.h:67
s_env_t::sampleRepeatRate
int sampleRepeatRate
Definition:
s_local.h:65
s_sample_t
Definition:
s_local.h:41
s_sample_t::index
int index
Definition:
s_local.h:47
s_sample_t::name
char * name
Definition:
s_local.h:42
s_sample_t::lastPlayed
int lastPlayed
Definition:
s_local.h:43
s_sample_t::hashNext
struct s_sample_s * hashNext
Definition:
s_local.h:46
s_sample_t::chunk
Mix_Chunk * chunk
Definition:
s_local.h:45
vec3_t
vec_t vec3_t[3]
Definition:
ufotypes.h:39
src
client
sound
s_local.h
Generated on Tue Jul 19 2022 00:00:00 for UFO: Alien Invasion by
1.9.4