1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
/*
* PARSEC HEADER: aud_defs.h
*/
#ifndef _AUD_DEFS_H_
#define _AUD_DEFS_H_
// ----------------------------------------------------------------------------
// AUDIO SUBSYSTEM (AUD) related definitions -
// ----------------------------------------------------------------------------
typedef void *audiowave_t;
extern int SELECT_VOICE;
extern int STREAM_VOICE_L;
extern int STREAM_VOICE_R;
extern char console_audio_stream_path[];
extern char intro_stream_name[];
extern char menu_stream_name[];
// global volume between 0 and 255
extern int GlobalVolume;
extern int aud_sample_quality;
extern int aud_do_open_menu_sound_on_aud_conf;
// audio subsystem constraints ------------------------------------------------
//
#define AUD_MAX_VOLUME 255
#define AUD_MIN_VOLUME 0
#define AUD_RANGE_VOLUME ( AUD_MAX_VOLUME - AUD_MIN_VOLUME + 1 )
#define NUMCHANNELS 32
// audio subsystem return codes -----------------------------------------------
//
#define AUD_RETURN_SUCCESS 0
#define AUD_RETURN_FAILURE 1
// flags for looping and selection of sound -----------------------------------
//
enum {
SOUNDPARAMS_NONE = 0x0000,
SOUNDPARAMS_SELECTION = 0x0001, // play only a selection of the wave
SOUNDPARAMS_LOOP = 0x0002, // loop whole wave, only selection or extended loop
SOUNDPARAMS_LOOP_COUNT = 0x0010, // loop the sound numLoops times
SOUNDPARAMS_VOLUME = 0x0100, // set the specified volume
SOUNDPARAMS_STREAMWAVE = 0x0200 // play streamed wave
};
// parameters when playing a sound --------------------------------------------
//
struct SoundParams_s {
long start; // sample to start playing
long end; // sample to end playing
long startLoop; // sample to rewind when looping
long endLoop; // sample to end looping in all but the last loop
long numLoops; // number of loops to play the sound
int volume; // volume this sound has to be played with
dword flags; // indicate which fields are set
};
// struct for handling distance relative volume changes -----------------------
//
struct DistVolumeInfo_s {
DistVolumeInfo_s* next;
int nChannel;
int nMaxVolume;
int nMinVolume;
geomv_t fMaxVolumeDist; // distance for max. volume
geomv_t fMinVolumeDist; // distance for min. volume
float fRolloffscale; // scale for the rolloff inside the sound sphere
GenObject* pListener;
GenObject* pOriginator;
};
// ids for different types of jim comments ------------------------------------
//
enum {
JIM_COMMENT_ANGRY, // 0
JIM_COMMENT_WEAPON, // 1
JIM_COMMENT_KILLED, // 2
JIM_COMMENT_EATTHIS, // 3
JIM_COMMENT_ENERGY, // 4
JIM_COMMENT_BORED, // 5
JIM_COMMENT_NUM_COMMENTS
};
// ids for different types of thrust sounds -----------------------------------
//
enum {
THRUST_TYPE_NORMAL, // 0
THRUST_TYPE_SLIDE // 1
};
// include system-specific subsystem prototypes -------------------------------
//
#include "aud_subh.h"
#endif // _AUD_DEFS_H_
|