summary refs log tree commit diff stats
path: root/vendor/fmod/inc/fmod_studio_common.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2022-03-11 15:33:28 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2022-03-11 15:33:28 -0500
commit6cfc54f019ea793c75c012af9c8249eac936cfac (patch)
treef19eed64e9b284136f3b802d4dee71ee24978646 /vendor/fmod/inc/fmod_studio_common.h
parent456122f5f0086ed0dbe1b784266b96e9624aa8e1 (diff)
downloadether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.gz
ether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.bz2
ether-6cfc54f019ea793c75c012af9c8249eac936cfac.zip
Added music and lamp popping sound
Diffstat (limited to 'vendor/fmod/inc/fmod_studio_common.h')
-rw-r--r--vendor/fmod/inc/fmod_studio_common.h336
1 files changed, 336 insertions, 0 deletions
diff --git a/vendor/fmod/inc/fmod_studio_common.h b/vendor/fmod/inc/fmod_studio_common.h new file mode 100644 index 0000000..e22d993 --- /dev/null +++ b/vendor/fmod/inc/fmod_studio_common.h
@@ -0,0 +1,336 @@
1/* ======================================================================================== */
2/* FMOD Studio API - Common C/C++ header file. */
3/* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */
4/* */
5/* This header defines common enumerations, structs and callbacks that are shared between */
6/* the C and C++ interfaces. */
7/* */
8/* For more detail visit: */
9/* https://fmod.com/resources/documentation-api?version=2.0&page=page=studio-api.html */
10/* ======================================================================================== */
11#ifndef FMOD_STUDIO_COMMON_H
12#define FMOD_STUDIO_COMMON_H
13
14#include "fmod.h"
15
16/*
17 FMOD Studio types.
18*/
19typedef struct FMOD_STUDIO_SYSTEM FMOD_STUDIO_SYSTEM;
20typedef struct FMOD_STUDIO_EVENTDESCRIPTION FMOD_STUDIO_EVENTDESCRIPTION;
21typedef struct FMOD_STUDIO_EVENTINSTANCE FMOD_STUDIO_EVENTINSTANCE;
22typedef struct FMOD_STUDIO_BUS FMOD_STUDIO_BUS;
23typedef struct FMOD_STUDIO_VCA FMOD_STUDIO_VCA;
24typedef struct FMOD_STUDIO_BANK FMOD_STUDIO_BANK;
25typedef struct FMOD_STUDIO_COMMANDREPLAY FMOD_STUDIO_COMMANDREPLAY;
26
27/*
28 FMOD Studio constants
29*/
30#define FMOD_STUDIO_LOAD_MEMORY_ALIGNMENT 32
31
32typedef unsigned int FMOD_STUDIO_INITFLAGS;
33#define FMOD_STUDIO_INIT_NORMAL 0x00000000
34#define FMOD_STUDIO_INIT_LIVEUPDATE 0x00000001
35#define FMOD_STUDIO_INIT_ALLOW_MISSING_PLUGINS 0x00000002
36#define FMOD_STUDIO_INIT_SYNCHRONOUS_UPDATE 0x00000004
37#define FMOD_STUDIO_INIT_DEFERRED_CALLBACKS 0x00000008
38#define FMOD_STUDIO_INIT_LOAD_FROM_UPDATE 0x00000010
39#define FMOD_STUDIO_INIT_MEMORY_TRACKING 0x00000020
40
41typedef unsigned int FMOD_STUDIO_PARAMETER_FLAGS;
42#define FMOD_STUDIO_PARAMETER_READONLY 0x00000001
43#define FMOD_STUDIO_PARAMETER_AUTOMATIC 0x00000002
44#define FMOD_STUDIO_PARAMETER_GLOBAL 0x00000004
45#define FMOD_STUDIO_PARAMETER_DISCRETE 0x00000008
46#define FMOD_STUDIO_PARAMETER_LABELED 0x00000010
47
48typedef unsigned int FMOD_STUDIO_SYSTEM_CALLBACK_TYPE;
49#define FMOD_STUDIO_SYSTEM_CALLBACK_PREUPDATE 0x00000001
50#define FMOD_STUDIO_SYSTEM_CALLBACK_POSTUPDATE 0x00000002
51#define FMOD_STUDIO_SYSTEM_CALLBACK_BANK_UNLOAD 0x00000004
52#define FMOD_STUDIO_SYSTEM_CALLBACK_LIVEUPDATE_CONNECTED 0x00000008
53#define FMOD_STUDIO_SYSTEM_CALLBACK_LIVEUPDATE_DISCONNECTED 0x00000010
54#define FMOD_STUDIO_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
55
56typedef unsigned int FMOD_STUDIO_EVENT_CALLBACK_TYPE;
57#define FMOD_STUDIO_EVENT_CALLBACK_CREATED 0x00000001
58#define FMOD_STUDIO_EVENT_CALLBACK_DESTROYED 0x00000002
59#define FMOD_STUDIO_EVENT_CALLBACK_STARTING 0x00000004
60#define FMOD_STUDIO_EVENT_CALLBACK_STARTED 0x00000008
61#define FMOD_STUDIO_EVENT_CALLBACK_RESTARTED 0x00000010
62#define FMOD_STUDIO_EVENT_CALLBACK_STOPPED 0x00000020
63#define FMOD_STUDIO_EVENT_CALLBACK_START_FAILED 0x00000040
64#define FMOD_STUDIO_EVENT_CALLBACK_CREATE_PROGRAMMER_SOUND 0x00000080
65#define FMOD_STUDIO_EVENT_CALLBACK_DESTROY_PROGRAMMER_SOUND 0x00000100
66#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_CREATED 0x00000200
67#define FMOD_STUDIO_EVENT_CALLBACK_PLUGIN_DESTROYED 0x00000400
68#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_MARKER 0x00000800
69#define FMOD_STUDIO_EVENT_CALLBACK_TIMELINE_BEAT 0x00001000
70#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_PLAYED 0x00002000
71#define FMOD_STUDIO_EVENT_CALLBACK_SOUND_STOPPED 0x00004000
72#define FMOD_STUDIO_EVENT_CALLBACK_REAL_TO_VIRTUAL 0x00008000
73#define FMOD_STUDIO_EVENT_CALLBACK_VIRTUAL_TO_REAL 0x00010000
74#define FMOD_STUDIO_EVENT_CALLBACK_START_EVENT_COMMAND 0x00020000
75#define FMOD_STUDIO_EVENT_CALLBACK_NESTED_TIMELINE_BEAT 0x00040000
76#define FMOD_STUDIO_EVENT_CALLBACK_ALL 0xFFFFFFFF
77
78typedef unsigned int FMOD_STUDIO_LOAD_BANK_FLAGS;
79#define FMOD_STUDIO_LOAD_BANK_NORMAL 0x00000000
80#define FMOD_STUDIO_LOAD_BANK_NONBLOCKING 0x00000001
81#define FMOD_STUDIO_LOAD_BANK_DECOMPRESS_SAMPLES 0x00000002
82#define FMOD_STUDIO_LOAD_BANK_UNENCRYPTED 0x00000004
83
84typedef unsigned int FMOD_STUDIO_COMMANDCAPTURE_FLAGS;
85#define FMOD_STUDIO_COMMANDCAPTURE_NORMAL 0x00000000
86#define FMOD_STUDIO_COMMANDCAPTURE_FILEFLUSH 0x00000001
87#define FMOD_STUDIO_COMMANDCAPTURE_SKIP_INITIAL_STATE 0x00000002
88
89typedef unsigned int FMOD_STUDIO_COMMANDREPLAY_FLAGS;
90#define FMOD_STUDIO_COMMANDREPLAY_NORMAL 0x00000000
91#define FMOD_STUDIO_COMMANDREPLAY_SKIP_CLEANUP 0x00000001
92#define FMOD_STUDIO_COMMANDREPLAY_FAST_FORWARD 0x00000002
93#define FMOD_STUDIO_COMMANDREPLAY_SKIP_BANK_LOAD 0x00000004
94
95typedef enum FMOD_STUDIO_LOADING_STATE
96{
97 FMOD_STUDIO_LOADING_STATE_UNLOADING,
98 FMOD_STUDIO_LOADING_STATE_UNLOADED,
99 FMOD_STUDIO_LOADING_STATE_LOADING,
100 FMOD_STUDIO_LOADING_STATE_LOADED,
101 FMOD_STUDIO_LOADING_STATE_ERROR,
102
103 FMOD_STUDIO_LOADING_STATE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
104} FMOD_STUDIO_LOADING_STATE;
105
106typedef enum FMOD_STUDIO_LOAD_MEMORY_MODE
107{
108 FMOD_STUDIO_LOAD_MEMORY,
109 FMOD_STUDIO_LOAD_MEMORY_POINT,
110
111 FMOD_STUDIO_LOAD_MEMORY_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
112} FMOD_STUDIO_LOAD_MEMORY_MODE;
113
114typedef enum FMOD_STUDIO_PARAMETER_TYPE
115{
116 FMOD_STUDIO_PARAMETER_GAME_CONTROLLED,
117 FMOD_STUDIO_PARAMETER_AUTOMATIC_DISTANCE,
118 FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_CONE_ANGLE,
119 FMOD_STUDIO_PARAMETER_AUTOMATIC_EVENT_ORIENTATION,
120 FMOD_STUDIO_PARAMETER_AUTOMATIC_DIRECTION,
121 FMOD_STUDIO_PARAMETER_AUTOMATIC_ELEVATION,
122 FMOD_STUDIO_PARAMETER_AUTOMATIC_LISTENER_ORIENTATION,
123 FMOD_STUDIO_PARAMETER_AUTOMATIC_SPEED,
124 FMOD_STUDIO_PARAMETER_AUTOMATIC_SPEED_ABSOLUTE,
125 FMOD_STUDIO_PARAMETER_AUTOMATIC_DISTANCE_NORMALIZED,
126
127 FMOD_STUDIO_PARAMETER_MAX,
128 FMOD_STUDIO_PARAMETER_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
129} FMOD_STUDIO_PARAMETER_TYPE;
130
131typedef enum FMOD_STUDIO_USER_PROPERTY_TYPE
132{
133 FMOD_STUDIO_USER_PROPERTY_TYPE_INTEGER,
134 FMOD_STUDIO_USER_PROPERTY_TYPE_BOOLEAN,
135 FMOD_STUDIO_USER_PROPERTY_TYPE_FLOAT,
136 FMOD_STUDIO_USER_PROPERTY_TYPE_STRING,
137
138 FMOD_STUDIO_USER_PROPERTY_TYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
139} FMOD_STUDIO_USER_PROPERTY_TYPE;
140
141typedef enum FMOD_STUDIO_EVENT_PROPERTY
142{
143 FMOD_STUDIO_EVENT_PROPERTY_CHANNELPRIORITY,
144 FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_DELAY,
145 FMOD_STUDIO_EVENT_PROPERTY_SCHEDULE_LOOKAHEAD,
146 FMOD_STUDIO_EVENT_PROPERTY_MINIMUM_DISTANCE,
147 FMOD_STUDIO_EVENT_PROPERTY_MAXIMUM_DISTANCE,
148 FMOD_STUDIO_EVENT_PROPERTY_COOLDOWN,
149 FMOD_STUDIO_EVENT_PROPERTY_MAX,
150
151 FMOD_STUDIO_EVENT_PROPERTY_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
152} FMOD_STUDIO_EVENT_PROPERTY;
153
154typedef enum FMOD_STUDIO_PLAYBACK_STATE
155{
156 FMOD_STUDIO_PLAYBACK_PLAYING,
157 FMOD_STUDIO_PLAYBACK_SUSTAINING,
158 FMOD_STUDIO_PLAYBACK_STOPPED,
159 FMOD_STUDIO_PLAYBACK_STARTING,
160 FMOD_STUDIO_PLAYBACK_STOPPING,
161
162 FMOD_STUDIO_PLAYBACK_FORCEINT = 65536
163} FMOD_STUDIO_PLAYBACK_STATE;
164
165typedef enum FMOD_STUDIO_STOP_MODE
166{
167 FMOD_STUDIO_STOP_ALLOWFADEOUT,
168 FMOD_STUDIO_STOP_IMMEDIATE,
169
170 FMOD_STUDIO_STOP_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
171} FMOD_STUDIO_STOP_MODE;
172
173typedef enum FMOD_STUDIO_INSTANCETYPE
174{
175 FMOD_STUDIO_INSTANCETYPE_NONE,
176 FMOD_STUDIO_INSTANCETYPE_SYSTEM,
177 FMOD_STUDIO_INSTANCETYPE_EVENTDESCRIPTION,
178 FMOD_STUDIO_INSTANCETYPE_EVENTINSTANCE,
179 FMOD_STUDIO_INSTANCETYPE_PARAMETERINSTANCE,
180 FMOD_STUDIO_INSTANCETYPE_BUS,
181 FMOD_STUDIO_INSTANCETYPE_VCA,
182 FMOD_STUDIO_INSTANCETYPE_BANK,
183 FMOD_STUDIO_INSTANCETYPE_COMMANDREPLAY,
184
185 FMOD_STUDIO_INSTANCETYPE_FORCEINT = 65536 /* Makes sure this enum is signed 32bit. */
186} FMOD_STUDIO_INSTANCETYPE;
187
188/*
189 FMOD Studio structures
190*/
191typedef struct FMOD_STUDIO_BANK_INFO
192{
193 int size;
194 void *userdata;
195 int userdatalength;
196 FMOD_FILE_OPEN_CALLBACK opencallback;
197 FMOD_FILE_CLOSE_CALLBACK closecallback;
198 FMOD_FILE_READ_CALLBACK readcallback;
199 FMOD_FILE_SEEK_CALLBACK seekcallback;
200} FMOD_STUDIO_BANK_INFO;
201
202typedef struct FMOD_STUDIO_PARAMETER_ID
203{
204 unsigned int data1;
205 unsigned int data2;
206} FMOD_STUDIO_PARAMETER_ID;
207
208typedef struct FMOD_STUDIO_PARAMETER_DESCRIPTION
209{
210 const char *name;
211 FMOD_STUDIO_PARAMETER_ID id;
212 float minimum;
213 float maximum;
214 float defaultvalue;
215 FMOD_STUDIO_PARAMETER_TYPE type;
216 FMOD_STUDIO_PARAMETER_FLAGS flags;
217 FMOD_GUID guid;
218} FMOD_STUDIO_PARAMETER_DESCRIPTION;
219
220typedef struct FMOD_STUDIO_USER_PROPERTY
221{
222 const char *name;
223 FMOD_STUDIO_USER_PROPERTY_TYPE type;
224
225 union
226 {
227 int intvalue;
228 FMOD_BOOL boolvalue;
229 float floatvalue;
230 const char *stringvalue;
231 };
232} FMOD_STUDIO_USER_PROPERTY;
233
234typedef struct FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES
235{
236 const char *name;
237 FMOD_SOUND *sound;
238 int subsoundIndex;
239} FMOD_STUDIO_PROGRAMMER_SOUND_PROPERTIES;
240
241typedef struct FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES
242{
243 const char *name;
244 FMOD_DSP *dsp;
245} FMOD_STUDIO_PLUGIN_INSTANCE_PROPERTIES;
246
247typedef struct FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES
248{
249 const char *name;
250 int position;
251} FMOD_STUDIO_TIMELINE_MARKER_PROPERTIES;
252
253typedef struct FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES
254{
255 int bar;
256 int beat;
257 int position;
258 float tempo;
259 int timesignatureupper;
260 int timesignaturelower;
261} FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES;
262
263typedef struct FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES
264{
265 FMOD_GUID eventid;
266 FMOD_STUDIO_TIMELINE_BEAT_PROPERTIES properties;
267} FMOD_STUDIO_TIMELINE_NESTED_BEAT_PROPERTIES;
268
269typedef struct FMOD_STUDIO_ADVANCEDSETTINGS
270{
271 int cbsize;
272 unsigned int commandqueuesize;
273 unsigned int handleinitialsize;
274 int studioupdateperiod;
275 int idlesampledatapoolsize;
276 unsigned int streamingscheduledelay;
277 const char* encryptionkey;
278} FMOD_STUDIO_ADVANCEDSETTINGS;
279
280typedef struct FMOD_STUDIO_CPU_USAGE
281{
282 float update;
283} FMOD_STUDIO_CPU_USAGE;
284
285typedef struct FMOD_STUDIO_BUFFER_INFO
286{
287 int currentusage;
288 int peakusage;
289 int capacity;
290 int stallcount;
291 float stalltime;
292} FMOD_STUDIO_BUFFER_INFO;
293
294typedef struct FMOD_STUDIO_BUFFER_USAGE
295{
296 FMOD_STUDIO_BUFFER_INFO studiocommandqueue;
297 FMOD_STUDIO_BUFFER_INFO studiohandle;
298} FMOD_STUDIO_BUFFER_USAGE;
299
300typedef struct FMOD_STUDIO_SOUND_INFO
301{
302 const char *name_or_data;
303 FMOD_MODE mode;
304 FMOD_CREATESOUNDEXINFO exinfo;
305 int subsoundindex;
306} FMOD_STUDIO_SOUND_INFO;
307
308typedef struct FMOD_STUDIO_COMMAND_INFO
309{
310 const char *commandname;
311 int parentcommandindex;
312 int framenumber;
313 float frametime;
314 FMOD_STUDIO_INSTANCETYPE instancetype;
315 FMOD_STUDIO_INSTANCETYPE outputtype;
316 unsigned int instancehandle;
317 unsigned int outputhandle;
318} FMOD_STUDIO_COMMAND_INFO;
319
320typedef struct FMOD_STUDIO_MEMORY_USAGE
321{
322 int exclusive;
323 int inclusive;
324 int sampledata;
325} FMOD_STUDIO_MEMORY_USAGE;
326
327/*
328 FMOD Studio callbacks.
329*/
330typedef FMOD_RESULT (F_CALLBACK *FMOD_STUDIO_SYSTEM_CALLBACK) (FMOD_STUDIO_SYSTEM *system, FMOD_STUDIO_SYSTEM_CALLBACK_TYPE type, void *commanddata, void *userdata);
331typedef FMOD_RESULT (F_CALLBACK *FMOD_STUDIO_EVENT_CALLBACK) (FMOD_STUDIO_EVENT_CALLBACK_TYPE type, FMOD_STUDIO_EVENTINSTANCE *event, void *parameters);
332typedef FMOD_RESULT (F_CALLBACK *FMOD_STUDIO_COMMANDREPLAY_FRAME_CALLBACK) (FMOD_STUDIO_COMMANDREPLAY *replay, int commandindex, float currenttime, void *userdata);
333typedef FMOD_RESULT (F_CALLBACK *FMOD_STUDIO_COMMANDREPLAY_LOAD_BANK_CALLBACK) (FMOD_STUDIO_COMMANDREPLAY *replay, int commandindex, const FMOD_GUID *bankguid, const char *bankfilename, FMOD_STUDIO_LOAD_BANK_FLAGS flags, FMOD_STUDIO_BANK **bank, void *userdata);
334typedef FMOD_RESULT (F_CALLBACK *FMOD_STUDIO_COMMANDREPLAY_CREATE_INSTANCE_CALLBACK) (FMOD_STUDIO_COMMANDREPLAY *replay, int commandindex, FMOD_STUDIO_EVENTDESCRIPTION *eventdescription, FMOD_STUDIO_EVENTINSTANCE **instance, void *userdata);
335
336#endif // FMOD_STUDIO_COMMON_H