diff options
Diffstat (limited to 'vendor/fmod/inc/fmod.hpp')
-rw-r--r-- | vendor/fmod/inc/fmod.hpp | 606 |
1 files changed, 606 insertions, 0 deletions
diff --git a/vendor/fmod/inc/fmod.hpp b/vendor/fmod/inc/fmod.hpp new file mode 100644 index 0000000..243b270 --- /dev/null +++ b/vendor/fmod/inc/fmod.hpp | |||
@@ -0,0 +1,606 @@ | |||
1 | /* ======================================================================================== */ | ||
2 | /* FMOD Core API - C++ header file. */ | ||
3 | /* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ | ||
4 | /* */ | ||
5 | /* Use this header in conjunction with fmod_common.h (which contains all the constants / */ | ||
6 | /* callbacks) to develop using the C++ language. */ | ||
7 | /* */ | ||
8 | /* For more detail visit: */ | ||
9 | /* https://fmod.com/resources/documentation-api?version=2.0&page=core-api.html */ | ||
10 | /* ======================================================================================== */ | ||
11 | #ifndef _FMOD_HPP | ||
12 | #define _FMOD_HPP | ||
13 | |||
14 | #include "fmod_common.h" | ||
15 | #include "fmod.h" | ||
16 | |||
17 | /* | ||
18 | FMOD Namespace | ||
19 | */ | ||
20 | namespace FMOD | ||
21 | { | ||
22 | class System; | ||
23 | class Sound; | ||
24 | class ChannelControl; | ||
25 | class Channel; | ||
26 | class ChannelGroup; | ||
27 | class SoundGroup; | ||
28 | class DSP; | ||
29 | class DSPConnection; | ||
30 | class Geometry; | ||
31 | class Reverb3D; | ||
32 | |||
33 | /* | ||
34 | FMOD global system functions (optional). | ||
35 | */ | ||
36 | inline FMOD_RESULT Memory_Initialize (void *poolmem, int poollen, FMOD_MEMORY_ALLOC_CALLBACK useralloc, FMOD_MEMORY_REALLOC_CALLBACK userrealloc, FMOD_MEMORY_FREE_CALLBACK userfree, FMOD_MEMORY_TYPE memtypeflags = FMOD_MEMORY_ALL) { return FMOD_Memory_Initialize(poolmem, poollen, useralloc, userrealloc, userfree, memtypeflags); } | ||
37 | inline FMOD_RESULT Memory_GetStats (int *currentalloced, int *maxalloced, bool blocking = true) { return FMOD_Memory_GetStats(currentalloced, maxalloced, blocking); } | ||
38 | inline FMOD_RESULT Debug_Initialize (FMOD_DEBUG_FLAGS flags, FMOD_DEBUG_MODE mode = FMOD_DEBUG_MODE_TTY, FMOD_DEBUG_CALLBACK callback = 0, const char *filename = 0) { return FMOD_Debug_Initialize(flags, mode, callback, filename); } | ||
39 | inline FMOD_RESULT File_SetDiskBusy (int busy) { return FMOD_File_SetDiskBusy(busy); } | ||
40 | inline FMOD_RESULT File_GetDiskBusy (int *busy) { return FMOD_File_GetDiskBusy(busy); } | ||
41 | inline FMOD_RESULT Thread_SetAttributes (FMOD_THREAD_TYPE type, FMOD_THREAD_AFFINITY affinity = FMOD_THREAD_AFFINITY_GROUP_DEFAULT, FMOD_THREAD_PRIORITY priority = FMOD_THREAD_PRIORITY_DEFAULT, FMOD_THREAD_STACK_SIZE stacksize = FMOD_THREAD_STACK_SIZE_DEFAULT) { return FMOD_Thread_SetAttributes(type, affinity, priority, stacksize); } | ||
42 | |||
43 | /* | ||
44 | FMOD System factory functions. | ||
45 | */ | ||
46 | inline FMOD_RESULT System_Create (System **system, unsigned int headerversion = FMOD_VERSION) { return FMOD_System_Create((FMOD_SYSTEM **)system, headerversion); } | ||
47 | |||
48 | /* | ||
49 | 'System' API | ||
50 | */ | ||
51 | class System | ||
52 | { | ||
53 | private: | ||
54 | |||
55 | // Constructor made private so user cannot statically instance a System class. System_Create must be used. | ||
56 | System(); | ||
57 | System(const System &); | ||
58 | |||
59 | public: | ||
60 | |||
61 | FMOD_RESULT F_API release (); | ||
62 | |||
63 | // Setup functions. | ||
64 | FMOD_RESULT F_API setOutput (FMOD_OUTPUTTYPE output); | ||
65 | FMOD_RESULT F_API getOutput (FMOD_OUTPUTTYPE *output); | ||
66 | FMOD_RESULT F_API getNumDrivers (int *numdrivers); | ||
67 | FMOD_RESULT F_API getDriverInfo (int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels); | ||
68 | FMOD_RESULT F_API setDriver (int driver); | ||
69 | FMOD_RESULT F_API getDriver (int *driver); | ||
70 | FMOD_RESULT F_API setSoftwareChannels (int numsoftwarechannels); | ||
71 | FMOD_RESULT F_API getSoftwareChannels (int *numsoftwarechannels); | ||
72 | FMOD_RESULT F_API setSoftwareFormat (int samplerate, FMOD_SPEAKERMODE speakermode, int numrawspeakers); | ||
73 | FMOD_RESULT F_API getSoftwareFormat (int *samplerate, FMOD_SPEAKERMODE *speakermode, int *numrawspeakers); | ||
74 | FMOD_RESULT F_API setDSPBufferSize (unsigned int bufferlength, int numbuffers); | ||
75 | FMOD_RESULT F_API getDSPBufferSize (unsigned int *bufferlength, int *numbuffers); | ||
76 | FMOD_RESULT F_API setFileSystem (FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek, FMOD_FILE_ASYNCREAD_CALLBACK userasyncread, FMOD_FILE_ASYNCCANCEL_CALLBACK userasynccancel, int blockalign); | ||
77 | FMOD_RESULT F_API attachFileSystem (FMOD_FILE_OPEN_CALLBACK useropen, FMOD_FILE_CLOSE_CALLBACK userclose, FMOD_FILE_READ_CALLBACK userread, FMOD_FILE_SEEK_CALLBACK userseek); | ||
78 | FMOD_RESULT F_API setAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings); | ||
79 | FMOD_RESULT F_API getAdvancedSettings (FMOD_ADVANCEDSETTINGS *settings); | ||
80 | FMOD_RESULT F_API setCallback (FMOD_SYSTEM_CALLBACK callback, FMOD_SYSTEM_CALLBACK_TYPE callbackmask = FMOD_SYSTEM_CALLBACK_ALL); | ||
81 | |||
82 | // Plug-in support. | ||
83 | FMOD_RESULT F_API setPluginPath (const char *path); | ||
84 | FMOD_RESULT F_API loadPlugin (const char *filename, unsigned int *handle, unsigned int priority = 0); | ||
85 | FMOD_RESULT F_API unloadPlugin (unsigned int handle); | ||
86 | FMOD_RESULT F_API getNumNestedPlugins (unsigned int handle, int *count); | ||
87 | FMOD_RESULT F_API getNestedPlugin (unsigned int handle, int index, unsigned int *nestedhandle); | ||
88 | FMOD_RESULT F_API getNumPlugins (FMOD_PLUGINTYPE plugintype, int *numplugins); | ||
89 | FMOD_RESULT F_API getPluginHandle (FMOD_PLUGINTYPE plugintype, int index, unsigned int *handle); | ||
90 | FMOD_RESULT F_API getPluginInfo (unsigned int handle, FMOD_PLUGINTYPE *plugintype, char *name, int namelen, unsigned int *version); | ||
91 | FMOD_RESULT F_API setOutputByPlugin (unsigned int handle); | ||
92 | FMOD_RESULT F_API getOutputByPlugin (unsigned int *handle); | ||
93 | FMOD_RESULT F_API createDSPByPlugin (unsigned int handle, DSP **dsp); | ||
94 | FMOD_RESULT F_API getDSPInfoByPlugin (unsigned int handle, const FMOD_DSP_DESCRIPTION **description); | ||
95 | FMOD_RESULT F_API registerCodec (FMOD_CODEC_DESCRIPTION *description, unsigned int *handle, unsigned int priority = 0); | ||
96 | FMOD_RESULT F_API registerDSP (const FMOD_DSP_DESCRIPTION *description, unsigned int *handle); | ||
97 | FMOD_RESULT F_API registerOutput (const FMOD_OUTPUT_DESCRIPTION *description, unsigned int *handle); | ||
98 | |||
99 | // Init/Close. | ||
100 | FMOD_RESULT F_API init (int maxchannels, FMOD_INITFLAGS flags, void *extradriverdata); | ||
101 | FMOD_RESULT F_API close (); | ||
102 | |||
103 | // General post-init system functions. | ||
104 | FMOD_RESULT F_API update (); /* IMPORTANT! CALL THIS ONCE PER FRAME! */ | ||
105 | |||
106 | FMOD_RESULT F_API setSpeakerPosition (FMOD_SPEAKER speaker, float x, float y, bool active); | ||
107 | FMOD_RESULT F_API getSpeakerPosition (FMOD_SPEAKER speaker, float *x, float *y, bool *active); | ||
108 | FMOD_RESULT F_API setStreamBufferSize (unsigned int filebuffersize, FMOD_TIMEUNIT filebuffersizetype); | ||
109 | FMOD_RESULT F_API getStreamBufferSize (unsigned int *filebuffersize, FMOD_TIMEUNIT *filebuffersizetype); | ||
110 | FMOD_RESULT F_API set3DSettings (float dopplerscale, float distancefactor, float rolloffscale); | ||
111 | FMOD_RESULT F_API get3DSettings (float *dopplerscale, float *distancefactor, float *rolloffscale); | ||
112 | FMOD_RESULT F_API set3DNumListeners (int numlisteners); | ||
113 | FMOD_RESULT F_API get3DNumListeners (int *numlisteners); | ||
114 | FMOD_RESULT F_API set3DListenerAttributes (int listener, const FMOD_VECTOR *pos, const FMOD_VECTOR *vel, const FMOD_VECTOR *forward, const FMOD_VECTOR *up); | ||
115 | FMOD_RESULT F_API get3DListenerAttributes (int listener, FMOD_VECTOR *pos, FMOD_VECTOR *vel, FMOD_VECTOR *forward, FMOD_VECTOR *up); | ||
116 | FMOD_RESULT F_API set3DRolloffCallback (FMOD_3D_ROLLOFF_CALLBACK callback); | ||
117 | FMOD_RESULT F_API mixerSuspend (); | ||
118 | FMOD_RESULT F_API mixerResume (); | ||
119 | FMOD_RESULT F_API getDefaultMixMatrix (FMOD_SPEAKERMODE sourcespeakermode, FMOD_SPEAKERMODE targetspeakermode, float *matrix, int matrixhop); | ||
120 | FMOD_RESULT F_API getSpeakerModeChannels (FMOD_SPEAKERMODE mode, int *channels); | ||
121 | |||
122 | // System information functions. | ||
123 | FMOD_RESULT F_API getVersion (unsigned int *version); | ||
124 | FMOD_RESULT F_API getOutputHandle (void **handle); | ||
125 | FMOD_RESULT F_API getChannelsPlaying (int *channels, int *realchannels = 0); | ||
126 | FMOD_RESULT F_API getCPUUsage (FMOD_CPU_USAGE *usage); | ||
127 | FMOD_RESULT F_API getFileUsage (long long *sampleBytesRead, long long *streamBytesRead, long long *otherBytesRead); | ||
128 | |||
129 | // Sound/DSP/Channel/FX creation and retrieval. | ||
130 | FMOD_RESULT F_API createSound (const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, Sound **sound); | ||
131 | FMOD_RESULT F_API createStream (const char *name_or_data, FMOD_MODE mode, FMOD_CREATESOUNDEXINFO *exinfo, Sound **sound); | ||
132 | FMOD_RESULT F_API createDSP (const FMOD_DSP_DESCRIPTION *description, DSP **dsp); | ||
133 | FMOD_RESULT F_API createDSPByType (FMOD_DSP_TYPE type, DSP **dsp); | ||
134 | FMOD_RESULT F_API createChannelGroup (const char *name, ChannelGroup **channelgroup); | ||
135 | FMOD_RESULT F_API createSoundGroup (const char *name, SoundGroup **soundgroup); | ||
136 | FMOD_RESULT F_API createReverb3D (Reverb3D **reverb); | ||
137 | |||
138 | FMOD_RESULT F_API playSound (Sound *sound, ChannelGroup *channelgroup, bool paused, Channel **channel); | ||
139 | FMOD_RESULT F_API playDSP (DSP *dsp, ChannelGroup *channelgroup, bool paused, Channel **channel); | ||
140 | FMOD_RESULT F_API getChannel (int channelid, Channel **channel); | ||
141 | FMOD_RESULT F_API getDSPInfoByType (FMOD_DSP_TYPE type, const FMOD_DSP_DESCRIPTION **description); | ||
142 | FMOD_RESULT F_API getMasterChannelGroup (ChannelGroup **channelgroup); | ||
143 | FMOD_RESULT F_API getMasterSoundGroup (SoundGroup **soundgroup); | ||
144 | |||
145 | // Routing to ports. | ||
146 | FMOD_RESULT F_API attachChannelGroupToPort (FMOD_PORT_TYPE portType, FMOD_PORT_INDEX portIndex, ChannelGroup *channelgroup, bool passThru = false); | ||
147 | FMOD_RESULT F_API detachChannelGroupFromPort (ChannelGroup *channelgroup); | ||
148 | |||
149 | // Reverb API. | ||
150 | FMOD_RESULT F_API setReverbProperties (int instance, const FMOD_REVERB_PROPERTIES *prop); | ||
151 | FMOD_RESULT F_API getReverbProperties (int instance, FMOD_REVERB_PROPERTIES *prop); | ||
152 | |||
153 | // System level DSP functionality. | ||
154 | FMOD_RESULT F_API lockDSP (); | ||
155 | FMOD_RESULT F_API unlockDSP (); | ||
156 | |||
157 | // Recording API. | ||
158 | FMOD_RESULT F_API getRecordNumDrivers (int *numdrivers, int *numconnected); | ||
159 | FMOD_RESULT F_API getRecordDriverInfo (int id, char *name, int namelen, FMOD_GUID *guid, int *systemrate, FMOD_SPEAKERMODE *speakermode, int *speakermodechannels, FMOD_DRIVER_STATE *state); | ||
160 | FMOD_RESULT F_API getRecordPosition (int id, unsigned int *position); | ||
161 | FMOD_RESULT F_API recordStart (int id, Sound *sound, bool loop); | ||
162 | FMOD_RESULT F_API recordStop (int id); | ||
163 | FMOD_RESULT F_API isRecording (int id, bool *recording); | ||
164 | |||
165 | // Geometry API. | ||
166 | FMOD_RESULT F_API createGeometry (int maxpolygons, int maxvertices, Geometry **geometry); | ||
167 | FMOD_RESULT F_API setGeometrySettings (float maxworldsize); | ||
168 | FMOD_RESULT F_API getGeometrySettings (float *maxworldsize); | ||
169 | FMOD_RESULT F_API loadGeometry (const void *data, int datasize, Geometry **geometry); | ||
170 | FMOD_RESULT F_API getGeometryOcclusion (const FMOD_VECTOR *listener, const FMOD_VECTOR *source, float *direct, float *reverb); | ||
171 | |||
172 | // Network functions. | ||
173 | FMOD_RESULT F_API setNetworkProxy (const char *proxy); | ||
174 | FMOD_RESULT F_API getNetworkProxy (char *proxy, int proxylen); | ||
175 | FMOD_RESULT F_API setNetworkTimeout (int timeout); | ||
176 | FMOD_RESULT F_API getNetworkTimeout (int *timeout); | ||
177 | |||
178 | // Userdata set/get. | ||
179 | FMOD_RESULT F_API setUserData (void *userdata); | ||
180 | FMOD_RESULT F_API getUserData (void **userdata); | ||
181 | }; | ||
182 | |||
183 | /* | ||
184 | 'Sound' API | ||
185 | */ | ||
186 | class Sound | ||
187 | { | ||
188 | private: | ||
189 | |||
190 | // Constructor made private so user cannot statically instance a Sound class. Appropriate Sound creation or retrieval function must be used. | ||
191 | Sound(); | ||
192 | Sound(const Sound &); | ||
193 | |||
194 | public: | ||
195 | |||
196 | FMOD_RESULT F_API release (); | ||
197 | FMOD_RESULT F_API getSystemObject (System **system); | ||
198 | |||
199 | // Standard sound manipulation functions. | ||
200 | FMOD_RESULT F_API lock (unsigned int offset, unsigned int length, void **ptr1, void **ptr2, unsigned int *len1, unsigned int *len2); | ||
201 | FMOD_RESULT F_API unlock (void *ptr1, void *ptr2, unsigned int len1, unsigned int len2); | ||
202 | FMOD_RESULT F_API setDefaults (float frequency, int priority); | ||
203 | FMOD_RESULT F_API getDefaults (float *frequency, int *priority); | ||
204 | FMOD_RESULT F_API set3DMinMaxDistance (float min, float max); | ||
205 | FMOD_RESULT F_API get3DMinMaxDistance (float *min, float *max); | ||
206 | FMOD_RESULT F_API set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume); | ||
207 | FMOD_RESULT F_API get3DConeSettings (float *insideconeangle, float *outsideconeangle, float *outsidevolume); | ||
208 | FMOD_RESULT F_API set3DCustomRolloff (FMOD_VECTOR *points, int numpoints); | ||
209 | FMOD_RESULT F_API get3DCustomRolloff (FMOD_VECTOR **points, int *numpoints); | ||
210 | FMOD_RESULT F_API getSubSound (int index, Sound **subsound); | ||
211 | FMOD_RESULT F_API getSubSoundParent (Sound **parentsound); | ||
212 | FMOD_RESULT F_API getName (char *name, int namelen); | ||
213 | FMOD_RESULT F_API getLength (unsigned int *length, FMOD_TIMEUNIT lengthtype); | ||
214 | FMOD_RESULT F_API getFormat (FMOD_SOUND_TYPE *type, FMOD_SOUND_FORMAT *format, int *channels, int *bits); | ||
215 | FMOD_RESULT F_API getNumSubSounds (int *numsubsounds); | ||
216 | FMOD_RESULT F_API getNumTags (int *numtags, int *numtagsupdated); | ||
217 | FMOD_RESULT F_API getTag (const char *name, int index, FMOD_TAG *tag); | ||
218 | FMOD_RESULT F_API getOpenState (FMOD_OPENSTATE *openstate, unsigned int *percentbuffered, bool *starving, bool *diskbusy); | ||
219 | FMOD_RESULT F_API readData (void *buffer, unsigned int length, unsigned int *read); | ||
220 | FMOD_RESULT F_API seekData (unsigned int pcm); | ||
221 | |||
222 | FMOD_RESULT F_API setSoundGroup (SoundGroup *soundgroup); | ||
223 | FMOD_RESULT F_API getSoundGroup (SoundGroup **soundgroup); | ||
224 | |||
225 | // Synchronization point API. These points can come from markers embedded in wav files, and can also generate channel callbacks. | ||
226 | FMOD_RESULT F_API getNumSyncPoints (int *numsyncpoints); | ||
227 | FMOD_RESULT F_API getSyncPoint (int index, FMOD_SYNCPOINT **point); | ||
228 | FMOD_RESULT F_API getSyncPointInfo (FMOD_SYNCPOINT *point, char *name, int namelen, unsigned int *offset, FMOD_TIMEUNIT offsettype); | ||
229 | FMOD_RESULT F_API addSyncPoint (unsigned int offset, FMOD_TIMEUNIT offsettype, const char *name, FMOD_SYNCPOINT **point); | ||
230 | FMOD_RESULT F_API deleteSyncPoint (FMOD_SYNCPOINT *point); | ||
231 | |||
232 | // Functions also in Channel class but here they are the 'default' to save having to change it in Channel all the time. | ||
233 | FMOD_RESULT F_API setMode (FMOD_MODE mode); | ||
234 | FMOD_RESULT F_API getMode (FMOD_MODE *mode); | ||
235 | FMOD_RESULT F_API setLoopCount (int loopcount); | ||
236 | FMOD_RESULT F_API getLoopCount (int *loopcount); | ||
237 | FMOD_RESULT F_API setLoopPoints (unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype); | ||
238 | FMOD_RESULT F_API getLoopPoints (unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype); | ||
239 | |||
240 | // For MOD/S3M/XM/IT/MID sequenced formats only. | ||
241 | FMOD_RESULT F_API getMusicNumChannels (int *numchannels); | ||
242 | FMOD_RESULT F_API setMusicChannelVolume (int channel, float volume); | ||
243 | FMOD_RESULT F_API getMusicChannelVolume (int channel, float *volume); | ||
244 | FMOD_RESULT F_API setMusicSpeed (float speed); | ||
245 | FMOD_RESULT F_API getMusicSpeed (float *speed); | ||
246 | |||
247 | // Userdata set/get. | ||
248 | FMOD_RESULT F_API setUserData (void *userdata); | ||
249 | FMOD_RESULT F_API getUserData (void **userdata); | ||
250 | }; | ||
251 | |||
252 | |||
253 | /* | ||
254 | 'ChannelControl API'. This is a base class for Channel and ChannelGroup so they can share the same functionality. This cannot be used or instansiated explicitly. | ||
255 | */ | ||
256 | class ChannelControl | ||
257 | { | ||
258 | private: | ||
259 | |||
260 | // Constructor made private so user cannot statically instance a Control class. | ||
261 | ChannelControl(); | ||
262 | ChannelControl(const ChannelControl &); | ||
263 | |||
264 | public: | ||
265 | |||
266 | FMOD_RESULT F_API getSystemObject (System **system); | ||
267 | |||
268 | // General control functionality for Channels and ChannelGroups. | ||
269 | FMOD_RESULT F_API stop (); | ||
270 | FMOD_RESULT F_API setPaused (bool paused); | ||
271 | FMOD_RESULT F_API getPaused (bool *paused); | ||
272 | FMOD_RESULT F_API setVolume (float volume); | ||
273 | FMOD_RESULT F_API getVolume (float *volume); | ||
274 | FMOD_RESULT F_API setVolumeRamp (bool ramp); | ||
275 | FMOD_RESULT F_API getVolumeRamp (bool *ramp); | ||
276 | FMOD_RESULT F_API getAudibility (float *audibility); | ||
277 | FMOD_RESULT F_API setPitch (float pitch); | ||
278 | FMOD_RESULT F_API getPitch (float *pitch); | ||
279 | FMOD_RESULT F_API setMute (bool mute); | ||
280 | FMOD_RESULT F_API getMute (bool *mute); | ||
281 | FMOD_RESULT F_API setReverbProperties (int instance, float wet); | ||
282 | FMOD_RESULT F_API getReverbProperties (int instance, float *wet); | ||
283 | FMOD_RESULT F_API setLowPassGain (float gain); | ||
284 | FMOD_RESULT F_API getLowPassGain (float *gain); | ||
285 | FMOD_RESULT F_API setMode (FMOD_MODE mode); | ||
286 | FMOD_RESULT F_API getMode (FMOD_MODE *mode); | ||
287 | FMOD_RESULT F_API setCallback (FMOD_CHANNELCONTROL_CALLBACK callback); | ||
288 | FMOD_RESULT F_API isPlaying (bool *isplaying); | ||
289 | |||
290 | // Panning and level adjustment. | ||
291 | // Note all 'set' functions alter a final matrix, this is why the only get function is getMixMatrix, to avoid other get functions returning incorrect/obsolete values. | ||
292 | FMOD_RESULT F_API setPan (float pan); | ||
293 | FMOD_RESULT F_API setMixLevelsOutput (float frontleft, float frontright, float center, float lfe, float surroundleft, float surroundright, float backleft, float backright); | ||
294 | FMOD_RESULT F_API setMixLevelsInput (float *levels, int numlevels); | ||
295 | FMOD_RESULT F_API setMixMatrix (float *matrix, int outchannels, int inchannels, int inchannel_hop = 0); | ||
296 | FMOD_RESULT F_API getMixMatrix (float *matrix, int *outchannels, int *inchannels, int inchannel_hop = 0); | ||
297 | |||
298 | // Clock based functionality. | ||
299 | FMOD_RESULT F_API getDSPClock (unsigned long long *dspclock, unsigned long long *parentclock); | ||
300 | FMOD_RESULT F_API setDelay (unsigned long long dspclock_start, unsigned long long dspclock_end, bool stopchannels = true); | ||
301 | FMOD_RESULT F_API getDelay (unsigned long long *dspclock_start, unsigned long long *dspclock_end, bool *stopchannels = 0); | ||
302 | FMOD_RESULT F_API addFadePoint (unsigned long long dspclock, float volume); | ||
303 | FMOD_RESULT F_API setFadePointRamp (unsigned long long dspclock, float volume); | ||
304 | FMOD_RESULT F_API removeFadePoints (unsigned long long dspclock_start, unsigned long long dspclock_end); | ||
305 | FMOD_RESULT F_API getFadePoints (unsigned int *numpoints, unsigned long long *point_dspclock, float *point_volume); | ||
306 | |||
307 | // DSP effects. | ||
308 | FMOD_RESULT F_API getDSP (int index, DSP **dsp); | ||
309 | FMOD_RESULT F_API addDSP (int index, DSP *dsp); | ||
310 | FMOD_RESULT F_API removeDSP (DSP *dsp); | ||
311 | FMOD_RESULT F_API getNumDSPs (int *numdsps); | ||
312 | FMOD_RESULT F_API setDSPIndex (DSP *dsp, int index); | ||
313 | FMOD_RESULT F_API getDSPIndex (DSP *dsp, int *index); | ||
314 | |||
315 | // 3D functionality. | ||
316 | FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *pos, const FMOD_VECTOR *vel); | ||
317 | FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *pos, FMOD_VECTOR *vel); | ||
318 | FMOD_RESULT F_API set3DMinMaxDistance (float mindistance, float maxdistance); | ||
319 | FMOD_RESULT F_API get3DMinMaxDistance (float *mindistance, float *maxdistance); | ||
320 | FMOD_RESULT F_API set3DConeSettings (float insideconeangle, float outsideconeangle, float outsidevolume); | ||
321 | FMOD_RESULT F_API get3DConeSettings (float *insideconeangle, float *outsideconeangle, float *outsidevolume); | ||
322 | FMOD_RESULT F_API set3DConeOrientation (FMOD_VECTOR *orientation); | ||
323 | FMOD_RESULT F_API get3DConeOrientation (FMOD_VECTOR *orientation); | ||
324 | FMOD_RESULT F_API set3DCustomRolloff (FMOD_VECTOR *points, int numpoints); | ||
325 | FMOD_RESULT F_API get3DCustomRolloff (FMOD_VECTOR **points, int *numpoints); | ||
326 | FMOD_RESULT F_API set3DOcclusion (float directocclusion, float reverbocclusion); | ||
327 | FMOD_RESULT F_API get3DOcclusion (float *directocclusion, float *reverbocclusion); | ||
328 | FMOD_RESULT F_API set3DSpread (float angle); | ||
329 | FMOD_RESULT F_API get3DSpread (float *angle); | ||
330 | FMOD_RESULT F_API set3DLevel (float level); | ||
331 | FMOD_RESULT F_API get3DLevel (float *level); | ||
332 | FMOD_RESULT F_API set3DDopplerLevel (float level); | ||
333 | FMOD_RESULT F_API get3DDopplerLevel (float *level); | ||
334 | FMOD_RESULT F_API set3DDistanceFilter (bool custom, float customLevel, float centerFreq); | ||
335 | FMOD_RESULT F_API get3DDistanceFilter (bool *custom, float *customLevel, float *centerFreq); | ||
336 | |||
337 | // Userdata set/get. | ||
338 | FMOD_RESULT F_API setUserData (void *userdata); | ||
339 | FMOD_RESULT F_API getUserData (void **userdata); | ||
340 | }; | ||
341 | |||
342 | /* | ||
343 | 'Channel' API. | ||
344 | */ | ||
345 | class Channel : public ChannelControl | ||
346 | { | ||
347 | private: | ||
348 | |||
349 | // Constructor made private so user cannot statically instance a Channel class. Appropriate Channel creation or retrieval function must be used. | ||
350 | Channel(); | ||
351 | Channel(const Channel &); | ||
352 | |||
353 | public: | ||
354 | |||
355 | // Channel specific control functionality. | ||
356 | FMOD_RESULT F_API setFrequency (float frequency); | ||
357 | FMOD_RESULT F_API getFrequency (float *frequency); | ||
358 | FMOD_RESULT F_API setPriority (int priority); | ||
359 | FMOD_RESULT F_API getPriority (int *priority); | ||
360 | FMOD_RESULT F_API setPosition (unsigned int position, FMOD_TIMEUNIT postype); | ||
361 | FMOD_RESULT F_API getPosition (unsigned int *position, FMOD_TIMEUNIT postype); | ||
362 | FMOD_RESULT F_API setChannelGroup (ChannelGroup *channelgroup); | ||
363 | FMOD_RESULT F_API getChannelGroup (ChannelGroup **channelgroup); | ||
364 | FMOD_RESULT F_API setLoopCount (int loopcount); | ||
365 | FMOD_RESULT F_API getLoopCount (int *loopcount); | ||
366 | FMOD_RESULT F_API setLoopPoints (unsigned int loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int loopend, FMOD_TIMEUNIT loopendtype); | ||
367 | FMOD_RESULT F_API getLoopPoints (unsigned int *loopstart, FMOD_TIMEUNIT loopstarttype, unsigned int *loopend, FMOD_TIMEUNIT loopendtype); | ||
368 | |||
369 | // Information only functions. | ||
370 | FMOD_RESULT F_API isVirtual (bool *isvirtual); | ||
371 | FMOD_RESULT F_API getCurrentSound (Sound **sound); | ||
372 | FMOD_RESULT F_API getIndex (int *index); | ||
373 | }; | ||
374 | |||
375 | /* | ||
376 | 'ChannelGroup' API | ||
377 | */ | ||
378 | class ChannelGroup : public ChannelControl | ||
379 | { | ||
380 | private: | ||
381 | |||
382 | // Constructor made private so user cannot statically instance a ChannelGroup class. Appropriate ChannelGroup creation or retrieval function must be used. | ||
383 | ChannelGroup(); | ||
384 | ChannelGroup(const ChannelGroup &); | ||
385 | |||
386 | public: | ||
387 | |||
388 | FMOD_RESULT F_API release (); | ||
389 | |||
390 | // Nested channel groups. | ||
391 | FMOD_RESULT F_API addGroup (ChannelGroup *group, bool propagatedspclock = true, DSPConnection **connection = 0); | ||
392 | FMOD_RESULT F_API getNumGroups (int *numgroups); | ||
393 | FMOD_RESULT F_API getGroup (int index, ChannelGroup **group); | ||
394 | FMOD_RESULT F_API getParentGroup (ChannelGroup **group); | ||
395 | |||
396 | // Information only functions. | ||
397 | FMOD_RESULT F_API getName (char *name, int namelen); | ||
398 | FMOD_RESULT F_API getNumChannels (int *numchannels); | ||
399 | FMOD_RESULT F_API getChannel (int index, Channel **channel); | ||
400 | }; | ||
401 | |||
402 | /* | ||
403 | 'SoundGroup' API | ||
404 | */ | ||
405 | class SoundGroup | ||
406 | { | ||
407 | private: | ||
408 | |||
409 | // Constructor made private so user cannot statically instance a SoundGroup class. Appropriate SoundGroup creation or retrieval function must be used. | ||
410 | SoundGroup(); | ||
411 | SoundGroup(const SoundGroup &); | ||
412 | |||
413 | public: | ||
414 | |||
415 | FMOD_RESULT F_API release (); | ||
416 | FMOD_RESULT F_API getSystemObject (System **system); | ||
417 | |||
418 | // SoundGroup control functions. | ||
419 | FMOD_RESULT F_API setMaxAudible (int maxaudible); | ||
420 | FMOD_RESULT F_API getMaxAudible (int *maxaudible); | ||
421 | FMOD_RESULT F_API setMaxAudibleBehavior (FMOD_SOUNDGROUP_BEHAVIOR behavior); | ||
422 | FMOD_RESULT F_API getMaxAudibleBehavior (FMOD_SOUNDGROUP_BEHAVIOR *behavior); | ||
423 | FMOD_RESULT F_API setMuteFadeSpeed (float speed); | ||
424 | FMOD_RESULT F_API getMuteFadeSpeed (float *speed); | ||
425 | FMOD_RESULT F_API setVolume (float volume); | ||
426 | FMOD_RESULT F_API getVolume (float *volume); | ||
427 | FMOD_RESULT F_API stop (); | ||
428 | |||
429 | // Information only functions. | ||
430 | FMOD_RESULT F_API getName (char *name, int namelen); | ||
431 | FMOD_RESULT F_API getNumSounds (int *numsounds); | ||
432 | FMOD_RESULT F_API getSound (int index, Sound **sound); | ||
433 | FMOD_RESULT F_API getNumPlaying (int *numplaying); | ||
434 | |||
435 | // Userdata set/get. | ||
436 | FMOD_RESULT F_API setUserData (void *userdata); | ||
437 | FMOD_RESULT F_API getUserData (void **userdata); | ||
438 | }; | ||
439 | |||
440 | /* | ||
441 | 'DSP' API | ||
442 | */ | ||
443 | class DSP | ||
444 | { | ||
445 | private: | ||
446 | |||
447 | // Constructor made private so user cannot statically instance a DSP class. Appropriate DSP creation or retrieval function must be used. | ||
448 | DSP(); | ||
449 | DSP(const DSP &); | ||
450 | |||
451 | public: | ||
452 | |||
453 | FMOD_RESULT F_API release (); | ||
454 | FMOD_RESULT F_API getSystemObject (System **system); | ||
455 | |||
456 | // Connection / disconnection / input and output enumeration. | ||
457 | FMOD_RESULT F_API addInput (DSP *input, DSPConnection **connection = 0, FMOD_DSPCONNECTION_TYPE type = FMOD_DSPCONNECTION_TYPE_STANDARD); | ||
458 | FMOD_RESULT F_API disconnectFrom (DSP *target, DSPConnection *connection = 0); | ||
459 | FMOD_RESULT F_API disconnectAll (bool inputs, bool outputs); | ||
460 | FMOD_RESULT F_API getNumInputs (int *numinputs); | ||
461 | FMOD_RESULT F_API getNumOutputs (int *numoutputs); | ||
462 | FMOD_RESULT F_API getInput (int index, DSP **input, DSPConnection **inputconnection); | ||
463 | FMOD_RESULT F_API getOutput (int index, DSP **output, DSPConnection **outputconnection); | ||
464 | |||
465 | // DSP unit control. | ||
466 | FMOD_RESULT F_API setActive (bool active); | ||
467 | FMOD_RESULT F_API getActive (bool *active); | ||
468 | FMOD_RESULT F_API setBypass (bool bypass); | ||
469 | FMOD_RESULT F_API getBypass (bool *bypass); | ||
470 | FMOD_RESULT F_API setWetDryMix (float prewet, float postwet, float dry); | ||
471 | FMOD_RESULT F_API getWetDryMix (float *prewet, float *postwet, float *dry); | ||
472 | FMOD_RESULT F_API setChannelFormat (FMOD_CHANNELMASK channelmask, int numchannels, FMOD_SPEAKERMODE source_speakermode); | ||
473 | FMOD_RESULT F_API getChannelFormat (FMOD_CHANNELMASK *channelmask, int *numchannels, FMOD_SPEAKERMODE *source_speakermode); | ||
474 | FMOD_RESULT F_API getOutputChannelFormat (FMOD_CHANNELMASK inmask, int inchannels, FMOD_SPEAKERMODE inspeakermode, FMOD_CHANNELMASK *outmask, int *outchannels, FMOD_SPEAKERMODE *outspeakermode); | ||
475 | FMOD_RESULT F_API reset (); | ||
476 | |||
477 | // DSP parameter control. | ||
478 | FMOD_RESULT F_API setParameterFloat (int index, float value); | ||
479 | FMOD_RESULT F_API setParameterInt (int index, int value); | ||
480 | FMOD_RESULT F_API setParameterBool (int index, bool value); | ||
481 | FMOD_RESULT F_API setParameterData (int index, void *data, unsigned int length); | ||
482 | FMOD_RESULT F_API getParameterFloat (int index, float *value, char *valuestr, int valuestrlen); | ||
483 | FMOD_RESULT F_API getParameterInt (int index, int *value, char *valuestr, int valuestrlen); | ||
484 | FMOD_RESULT F_API getParameterBool (int index, bool *value, char *valuestr, int valuestrlen); | ||
485 | FMOD_RESULT F_API getParameterData (int index, void **data, unsigned int *length, char *valuestr, int valuestrlen); | ||
486 | FMOD_RESULT F_API getNumParameters (int *numparams); | ||
487 | FMOD_RESULT F_API getParameterInfo (int index, FMOD_DSP_PARAMETER_DESC **desc); | ||
488 | FMOD_RESULT F_API getDataParameterIndex (int datatype, int *index); | ||
489 | FMOD_RESULT F_API showConfigDialog (void *hwnd, bool show); | ||
490 | |||
491 | // DSP attributes. | ||
492 | FMOD_RESULT F_API getInfo (char *name, unsigned int *version, int *channels, int *configwidth, int *configheight); | ||
493 | FMOD_RESULT F_API getType (FMOD_DSP_TYPE *type); | ||
494 | FMOD_RESULT F_API getIdle (bool *idle); | ||
495 | |||
496 | // Userdata set/get. | ||
497 | FMOD_RESULT F_API setUserData (void *userdata); | ||
498 | FMOD_RESULT F_API getUserData (void **userdata); | ||
499 | |||
500 | // Metering. | ||
501 | FMOD_RESULT F_API setMeteringEnabled (bool inputEnabled, bool outputEnabled); | ||
502 | FMOD_RESULT F_API getMeteringEnabled (bool *inputEnabled, bool *outputEnabled); | ||
503 | FMOD_RESULT F_API getMeteringInfo (FMOD_DSP_METERING_INFO *inputInfo, FMOD_DSP_METERING_INFO *outputInfo); | ||
504 | FMOD_RESULT F_API getCPUUsage (unsigned int *exclusive, unsigned int *inclusive); | ||
505 | }; | ||
506 | |||
507 | |||
508 | /* | ||
509 | 'DSPConnection' API | ||
510 | */ | ||
511 | class DSPConnection | ||
512 | { | ||
513 | private: | ||
514 | |||
515 | // Constructor made private so user cannot statically instance a DSPConnection class. Appropriate DSPConnection creation or retrieval function must be used. | ||
516 | DSPConnection(); | ||
517 | DSPConnection(const DSPConnection &); | ||
518 | |||
519 | public: | ||
520 | |||
521 | FMOD_RESULT F_API getInput (DSP **input); | ||
522 | FMOD_RESULT F_API getOutput (DSP **output); | ||
523 | FMOD_RESULT F_API setMix (float volume); | ||
524 | FMOD_RESULT F_API getMix (float *volume); | ||
525 | FMOD_RESULT F_API setMixMatrix (float *matrix, int outchannels, int inchannels, int inchannel_hop = 0); | ||
526 | FMOD_RESULT F_API getMixMatrix (float *matrix, int *outchannels, int *inchannels, int inchannel_hop = 0); | ||
527 | FMOD_RESULT F_API getType (FMOD_DSPCONNECTION_TYPE *type); | ||
528 | |||
529 | // Userdata set/get. | ||
530 | FMOD_RESULT F_API setUserData (void *userdata); | ||
531 | FMOD_RESULT F_API getUserData (void **userdata); | ||
532 | }; | ||
533 | |||
534 | |||
535 | /* | ||
536 | 'Geometry' API | ||
537 | */ | ||
538 | class Geometry | ||
539 | { | ||
540 | private: | ||
541 | |||
542 | // Constructor made private so user cannot statically instance a Geometry class. Appropriate Geometry creation or retrieval function must be used. | ||
543 | Geometry(); | ||
544 | Geometry(const Geometry &); | ||
545 | |||
546 | public: | ||
547 | |||
548 | FMOD_RESULT F_API release (); | ||
549 | |||
550 | // Polygon manipulation. | ||
551 | FMOD_RESULT F_API addPolygon (float directocclusion, float reverbocclusion, bool doublesided, int numvertices, const FMOD_VECTOR *vertices, int *polygonindex); | ||
552 | FMOD_RESULT F_API getNumPolygons (int *numpolygons); | ||
553 | FMOD_RESULT F_API getMaxPolygons (int *maxpolygons, int *maxvertices); | ||
554 | FMOD_RESULT F_API getPolygonNumVertices (int index, int *numvertices); | ||
555 | FMOD_RESULT F_API setPolygonVertex (int index, int vertexindex, const FMOD_VECTOR *vertex); | ||
556 | FMOD_RESULT F_API getPolygonVertex (int index, int vertexindex, FMOD_VECTOR *vertex); | ||
557 | FMOD_RESULT F_API setPolygonAttributes (int index, float directocclusion, float reverbocclusion, bool doublesided); | ||
558 | FMOD_RESULT F_API getPolygonAttributes (int index, float *directocclusion, float *reverbocclusion, bool *doublesided); | ||
559 | |||
560 | // Object manipulation. | ||
561 | FMOD_RESULT F_API setActive (bool active); | ||
562 | FMOD_RESULT F_API getActive (bool *active); | ||
563 | FMOD_RESULT F_API setRotation (const FMOD_VECTOR *forward, const FMOD_VECTOR *up); | ||
564 | FMOD_RESULT F_API getRotation (FMOD_VECTOR *forward, FMOD_VECTOR *up); | ||
565 | FMOD_RESULT F_API setPosition (const FMOD_VECTOR *position); | ||
566 | FMOD_RESULT F_API getPosition (FMOD_VECTOR *position); | ||
567 | FMOD_RESULT F_API setScale (const FMOD_VECTOR *scale); | ||
568 | FMOD_RESULT F_API getScale (FMOD_VECTOR *scale); | ||
569 | FMOD_RESULT F_API save (void *data, int *datasize); | ||
570 | |||
571 | // Userdata set/get. | ||
572 | FMOD_RESULT F_API setUserData (void *userdata); | ||
573 | FMOD_RESULT F_API getUserData (void **userdata); | ||
574 | }; | ||
575 | |||
576 | |||
577 | /* | ||
578 | 'Reverb' API | ||
579 | */ | ||
580 | class Reverb3D | ||
581 | { | ||
582 | private: | ||
583 | |||
584 | // Constructor made private so user cannot statically instance a Reverb3D class. Appropriate Reverb creation or retrieval function must be used. | ||
585 | Reverb3D(); | ||
586 | Reverb3D(const Reverb3D &); | ||
587 | |||
588 | public: | ||
589 | |||
590 | FMOD_RESULT F_API release (); | ||
591 | |||
592 | // Reverb manipulation. | ||
593 | FMOD_RESULT F_API set3DAttributes (const FMOD_VECTOR *position, float mindistance, float maxdistance); | ||
594 | FMOD_RESULT F_API get3DAttributes (FMOD_VECTOR *position, float *mindistance,float *maxdistance); | ||
595 | FMOD_RESULT F_API setProperties (const FMOD_REVERB_PROPERTIES *properties); | ||
596 | FMOD_RESULT F_API getProperties (FMOD_REVERB_PROPERTIES *properties); | ||
597 | FMOD_RESULT F_API setActive (bool active); | ||
598 | FMOD_RESULT F_API getActive (bool *active); | ||
599 | |||
600 | // Userdata set/get. | ||
601 | FMOD_RESULT F_API setUserData (void *userdata); | ||
602 | FMOD_RESULT F_API getUserData (void **userdata); | ||
603 | }; | ||
604 | } | ||
605 | |||
606 | #endif | ||