diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-11 15:33:28 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2022-03-11 15:33:28 -0500 |
commit | 6cfc54f019ea793c75c012af9c8249eac936cfac (patch) | |
tree | f19eed64e9b284136f3b802d4dee71ee24978646 /vendor/fmod/inc/fmod_dsp.cs | |
parent | 456122f5f0086ed0dbe1b784266b96e9624aa8e1 (diff) | |
download | ether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.gz ether-6cfc54f019ea793c75c012af9c8249eac936cfac.tar.bz2 ether-6cfc54f019ea793c75c012af9c8249eac936cfac.zip |
Added music and lamp popping sound
Diffstat (limited to 'vendor/fmod/inc/fmod_dsp.cs')
-rw-r--r-- | vendor/fmod/inc/fmod_dsp.cs | 897 |
1 files changed, 897 insertions, 0 deletions
diff --git a/vendor/fmod/inc/fmod_dsp.cs b/vendor/fmod/inc/fmod_dsp.cs new file mode 100644 index 0000000..92ad06d --- /dev/null +++ b/vendor/fmod/inc/fmod_dsp.cs | |||
@@ -0,0 +1,897 @@ | |||
1 | /* ======================================================================================== */ | ||
2 | /* FMOD Core API - DSP header file. */ | ||
3 | /* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2021. */ | ||
4 | /* */ | ||
5 | /* Use this header if you are wanting to develop your own DSP plugin to use with FMODs */ | ||
6 | /* dsp system. With this header you can make your own DSP plugin that FMOD can */ | ||
7 | /* register and use. See the documentation and examples on how to make a working plugin. */ | ||
8 | /* */ | ||
9 | /* For more detail visit: */ | ||
10 | /* https://fmod.com/resources/documentation-api?version=2.0&page=plugin-api-dsp.html */ | ||
11 | /* =========================================================================================*/ | ||
12 | |||
13 | using System; | ||
14 | using System.Text; | ||
15 | using System.Runtime.InteropServices; | ||
16 | |||
17 | namespace FMOD | ||
18 | { | ||
19 | [StructLayout(LayoutKind.Sequential)] | ||
20 | public struct DSP_BUFFER_ARRAY | ||
21 | { | ||
22 | public int numbuffers; | ||
23 | public int[] buffernumchannels; | ||
24 | public CHANNELMASK[] bufferchannelmask; | ||
25 | public IntPtr[] buffers; | ||
26 | public SPEAKERMODE speakermode; | ||
27 | } | ||
28 | |||
29 | public enum DSP_PROCESS_OPERATION | ||
30 | { | ||
31 | PROCESS_PERFORM = 0, | ||
32 | PROCESS_QUERY | ||
33 | } | ||
34 | |||
35 | [StructLayout(LayoutKind.Sequential)] | ||
36 | public struct COMPLEX | ||
37 | { | ||
38 | public float real; | ||
39 | public float imag; | ||
40 | } | ||
41 | |||
42 | public enum DSP_PAN_SURROUND_FLAGS | ||
43 | { | ||
44 | DEFAULT = 0, | ||
45 | ROTATION_NOT_BIASED = 1, | ||
46 | } | ||
47 | |||
48 | |||
49 | /* | ||
50 | DSP callbacks | ||
51 | */ | ||
52 | public delegate RESULT DSP_CREATECALLBACK (ref DSP_STATE dsp_state); | ||
53 | public delegate RESULT DSP_RELEASECALLBACK (ref DSP_STATE dsp_state); | ||
54 | public delegate RESULT DSP_RESETCALLBACK (ref DSP_STATE dsp_state); | ||
55 | public delegate RESULT DSP_SETPOSITIONCALLBACK (ref DSP_STATE dsp_state, uint pos); | ||
56 | public delegate RESULT DSP_READCALLBACK (ref DSP_STATE dsp_state, IntPtr inbuffer, IntPtr outbuffer, uint length, int inchannels, ref int outchannels); | ||
57 | public delegate RESULT DSP_SHOULDIPROCESS_CALLBACK (ref DSP_STATE dsp_state, bool inputsidle, uint length, CHANNELMASK inmask, int inchannels, SPEAKERMODE speakermode); | ||
58 | public delegate RESULT DSP_PROCESS_CALLBACK (ref DSP_STATE dsp_state, uint length, ref DSP_BUFFER_ARRAY inbufferarray, ref DSP_BUFFER_ARRAY outbufferarray, bool inputsidle, DSP_PROCESS_OPERATION op); | ||
59 | public delegate RESULT DSP_SETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, float value); | ||
60 | public delegate RESULT DSP_SETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, int value); | ||
61 | public delegate RESULT DSP_SETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, bool value); | ||
62 | public delegate RESULT DSP_SETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, IntPtr data, uint length); | ||
63 | public delegate RESULT DSP_GETPARAM_FLOAT_CALLBACK (ref DSP_STATE dsp_state, int index, ref float value, IntPtr valuestr); | ||
64 | public delegate RESULT DSP_GETPARAM_INT_CALLBACK (ref DSP_STATE dsp_state, int index, ref int value, IntPtr valuestr); | ||
65 | public delegate RESULT DSP_GETPARAM_BOOL_CALLBACK (ref DSP_STATE dsp_state, int index, ref bool value, IntPtr valuestr); | ||
66 | public delegate RESULT DSP_GETPARAM_DATA_CALLBACK (ref DSP_STATE dsp_state, int index, ref IntPtr data, ref uint length, IntPtr valuestr); | ||
67 | public delegate RESULT DSP_SYSTEM_REGISTER_CALLBACK (ref DSP_STATE dsp_state); | ||
68 | public delegate RESULT DSP_SYSTEM_DEREGISTER_CALLBACK (ref DSP_STATE dsp_state); | ||
69 | public delegate RESULT DSP_SYSTEM_MIX_CALLBACK (ref DSP_STATE dsp_state, int stage); | ||
70 | |||
71 | |||
72 | /* | ||
73 | DSP functions | ||
74 | */ | ||
75 | public delegate IntPtr DSP_ALLOC_FUNC (uint size, MEMORY_TYPE type, IntPtr sourcestr); | ||
76 | public delegate IntPtr DSP_REALLOC_FUNC (IntPtr ptr, uint size, MEMORY_TYPE type, IntPtr sourcestr); | ||
77 | public delegate void DSP_FREE_FUNC (IntPtr ptr, MEMORY_TYPE type, IntPtr sourcestr); | ||
78 | public delegate void DSP_LOG_FUNC (DEBUG_FLAGS level, IntPtr file, int line, IntPtr function, IntPtr format); | ||
79 | public delegate RESULT DSP_GETSAMPLERATE_FUNC (ref DSP_STATE dsp_state, ref int rate); | ||
80 | public delegate RESULT DSP_GETBLOCKSIZE_FUNC (ref DSP_STATE dsp_state, ref uint blocksize); | ||
81 | public delegate RESULT DSP_GETSPEAKERMODE_FUNC (ref DSP_STATE dsp_state, ref int speakermode_mixer, ref int speakermode_output); | ||
82 | public delegate RESULT DSP_GETCLOCK_FUNC (ref DSP_STATE dsp_state, out ulong clock, out uint offset, out uint length); | ||
83 | public delegate RESULT DSP_GETLISTENERATTRIBUTES_FUNC (ref DSP_STATE dsp_state, ref int numlisteners, IntPtr attributes); | ||
84 | public delegate RESULT DSP_GETUSERDATA_FUNC (ref DSP_STATE dsp_state, out IntPtr userdata); | ||
85 | public delegate RESULT DSP_DFT_FFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr signal, IntPtr dft, IntPtr window, int signalhop); | ||
86 | public delegate RESULT DSP_DFT_IFFTREAL_FUNC (ref DSP_STATE dsp_state, int size, IntPtr dft, IntPtr signal, IntPtr window, int signalhop); | ||
87 | public delegate RESULT DSP_PAN_SUMMONOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float lowFrequencyGain, float overallGain, IntPtr matrix); | ||
88 | public delegate RESULT DSP_PAN_SUMSTEREOMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, float pan, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); | ||
89 | public delegate RESULT DSP_PAN_SUMSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int sourceSpeakerMode, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix, DSP_PAN_SURROUND_FLAGS flags); | ||
90 | public delegate RESULT DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); | ||
91 | public delegate RESULT DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC (ref DSP_STATE dsp_state, int targetSpeakerMode, float direction, float extent, float rotation, float lowFrequencyGain, float overallGain, int matrixHop, IntPtr matrix); | ||
92 | public delegate RESULT DSP_PAN_GETROLLOFFGAIN_FUNC (ref DSP_STATE dsp_state, DSP_PAN_3D_ROLLOFF_TYPE rolloff, float distance, float mindistance, float maxdistance, out float gain); | ||
93 | |||
94 | |||
95 | public enum DSP_TYPE : int | ||
96 | { | ||
97 | UNKNOWN, | ||
98 | MIXER, | ||
99 | OSCILLATOR, | ||
100 | LOWPASS, | ||
101 | ITLOWPASS, | ||
102 | HIGHPASS, | ||
103 | ECHO, | ||
104 | FADER, | ||
105 | FLANGE, | ||
106 | DISTORTION, | ||
107 | NORMALIZE, | ||
108 | LIMITER, | ||
109 | PARAMEQ, | ||
110 | PITCHSHIFT, | ||
111 | CHORUS, | ||
112 | VSTPLUGIN, | ||
113 | WINAMPPLUGIN, | ||
114 | ITECHO, | ||
115 | COMPRESSOR, | ||
116 | SFXREVERB, | ||
117 | LOWPASS_SIMPLE, | ||
118 | DELAY, | ||
119 | TREMOLO, | ||
120 | LADSPAPLUGIN, | ||
121 | SEND, | ||
122 | RETURN, | ||
123 | HIGHPASS_SIMPLE, | ||
124 | PAN, | ||
125 | THREE_EQ, | ||
126 | FFT, | ||
127 | LOUDNESS_METER, | ||
128 | ENVELOPEFOLLOWER, | ||
129 | CONVOLUTIONREVERB, | ||
130 | CHANNELMIX, | ||
131 | TRANSCEIVER, | ||
132 | OBJECTPAN, | ||
133 | MULTIBAND_EQ, | ||
134 | MAX | ||
135 | } | ||
136 | |||
137 | public enum DSP_PARAMETER_TYPE | ||
138 | { | ||
139 | FLOAT = 0, | ||
140 | INT, | ||
141 | BOOL, | ||
142 | DATA, | ||
143 | MAX | ||
144 | } | ||
145 | |||
146 | public enum DSP_PARAMETER_FLOAT_MAPPING_TYPE | ||
147 | { | ||
148 | DSP_PARAMETER_FLOAT_MAPPING_TYPE_LINEAR = 0, | ||
149 | DSP_PARAMETER_FLOAT_MAPPING_TYPE_AUTO, | ||
150 | DSP_PARAMETER_FLOAT_MAPPING_TYPE_PIECEWISE_LINEAR, | ||
151 | } | ||
152 | |||
153 | [StructLayout(LayoutKind.Sequential)] | ||
154 | public struct DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR | ||
155 | { | ||
156 | public int numpoints; | ||
157 | public IntPtr pointparamvalues; | ||
158 | public IntPtr pointpositions; | ||
159 | } | ||
160 | |||
161 | [StructLayout(LayoutKind.Sequential)] | ||
162 | public struct DSP_PARAMETER_FLOAT_MAPPING | ||
163 | { | ||
164 | public DSP_PARAMETER_FLOAT_MAPPING_TYPE type; | ||
165 | public DSP_PARAMETER_FLOAT_MAPPING_PIECEWISE_LINEAR piecewiselinearmapping; | ||
166 | } | ||
167 | |||
168 | |||
169 | [StructLayout(LayoutKind.Sequential)] | ||
170 | public struct DSP_PARAMETER_DESC_FLOAT | ||
171 | { | ||
172 | public float min; | ||
173 | public float max; | ||
174 | public float defaultval; | ||
175 | public DSP_PARAMETER_FLOAT_MAPPING mapping; | ||
176 | } | ||
177 | |||
178 | [StructLayout(LayoutKind.Sequential)] | ||
179 | public struct DSP_PARAMETER_DESC_INT | ||
180 | { | ||
181 | public int min; | ||
182 | public int max; | ||
183 | public int defaultval; | ||
184 | public bool goestoinf; | ||
185 | public IntPtr valuenames; | ||
186 | } | ||
187 | |||
188 | [StructLayout(LayoutKind.Sequential)] | ||
189 | public struct DSP_PARAMETER_DESC_BOOL | ||
190 | { | ||
191 | public bool defaultval; | ||
192 | public IntPtr valuenames; | ||
193 | } | ||
194 | |||
195 | [StructLayout(LayoutKind.Sequential)] | ||
196 | public struct DSP_PARAMETER_DESC_DATA | ||
197 | { | ||
198 | public int datatype; | ||
199 | } | ||
200 | |||
201 | [StructLayout(LayoutKind.Explicit)] | ||
202 | public struct DSP_PARAMETER_DESC_UNION | ||
203 | { | ||
204 | [FieldOffset(0)] | ||
205 | public DSP_PARAMETER_DESC_FLOAT floatdesc; | ||
206 | [FieldOffset(0)] | ||
207 | public DSP_PARAMETER_DESC_INT intdesc; | ||
208 | [FieldOffset(0)] | ||
209 | public DSP_PARAMETER_DESC_BOOL booldesc; | ||
210 | [FieldOffset(0)] | ||
211 | public DSP_PARAMETER_DESC_DATA datadesc; | ||
212 | } | ||
213 | |||
214 | [StructLayout(LayoutKind.Sequential)] | ||
215 | public struct DSP_PARAMETER_DESC | ||
216 | { | ||
217 | public DSP_PARAMETER_TYPE type; | ||
218 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] | ||
219 | public byte[] name; | ||
220 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 16)] | ||
221 | public byte[] label; | ||
222 | public string description; | ||
223 | |||
224 | public DSP_PARAMETER_DESC_UNION desc; | ||
225 | } | ||
226 | |||
227 | public enum DSP_PARAMETER_DATA_TYPE | ||
228 | { | ||
229 | DSP_PARAMETER_DATA_TYPE_USER = 0, | ||
230 | DSP_PARAMETER_DATA_TYPE_OVERALLGAIN = -1, | ||
231 | DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES = -2, | ||
232 | DSP_PARAMETER_DATA_TYPE_SIDECHAIN = -3, | ||
233 | DSP_PARAMETER_DATA_TYPE_FFT = -4, | ||
234 | DSP_PARAMETER_DATA_TYPE_3DATTRIBUTES_MULTI = -5, | ||
235 | DSP_PARAMETER_DATA_TYPE_ATTENUATION_RANGE = -6 | ||
236 | } | ||
237 | |||
238 | [StructLayout(LayoutKind.Sequential)] | ||
239 | public struct DSP_PARAMETER_OVERALLGAIN | ||
240 | { | ||
241 | public float linear_gain; | ||
242 | public float linear_gain_additive; | ||
243 | } | ||
244 | |||
245 | [StructLayout(LayoutKind.Sequential)] | ||
246 | public struct DSP_PARAMETER_3DATTRIBUTES | ||
247 | { | ||
248 | public ATTRIBUTES_3D relative; | ||
249 | public ATTRIBUTES_3D absolute; | ||
250 | } | ||
251 | |||
252 | [StructLayout(LayoutKind.Sequential)] | ||
253 | public struct DSP_PARAMETER_3DATTRIBUTES_MULTI | ||
254 | { | ||
255 | public int numlisteners; | ||
256 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] | ||
257 | public ATTRIBUTES_3D[] relative; | ||
258 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] | ||
259 | public float[] weight; | ||
260 | public ATTRIBUTES_3D absolute; | ||
261 | } | ||
262 | |||
263 | [StructLayout(LayoutKind.Sequential)] | ||
264 | public struct DSP_PARAMETER_SIDECHAIN | ||
265 | { | ||
266 | public int sidechainenable; | ||
267 | } | ||
268 | |||
269 | [StructLayout(LayoutKind.Sequential)] | ||
270 | public struct DSP_PARAMETER_FFT | ||
271 | { | ||
272 | public int length; | ||
273 | public int numchannels; | ||
274 | |||
275 | [MarshalAs(UnmanagedType.ByValArray,SizeConst=32)] | ||
276 | private IntPtr[] spectrum_internal; | ||
277 | |||
278 | public float[][] spectrum | ||
279 | { | ||
280 | get | ||
281 | { | ||
282 | var buffer = new float[numchannels][]; | ||
283 | |||
284 | for (int i = 0; i < numchannels; ++i) | ||
285 | { | ||
286 | buffer[i] = new float[length]; | ||
287 | Marshal.Copy(spectrum_internal[i], buffer[i], 0, length); | ||
288 | } | ||
289 | |||
290 | return buffer; | ||
291 | } | ||
292 | } | ||
293 | |||
294 | public void getSpectrum(ref float[][] buffer) | ||
295 | { | ||
296 | int bufferLength = Math.Min(buffer.Length, numchannels); | ||
297 | for (int i = 0; i < bufferLength; ++i) | ||
298 | { | ||
299 | getSpectrum(i, ref buffer[i]); | ||
300 | } | ||
301 | } | ||
302 | |||
303 | public void getSpectrum(int channel, ref float[] buffer) | ||
304 | { | ||
305 | int bufferLength = Math.Min(buffer.Length, length); | ||
306 | Marshal.Copy(spectrum_internal[channel], buffer, 0, bufferLength); | ||
307 | } | ||
308 | } | ||
309 | |||
310 | [StructLayout(LayoutKind.Sequential)] | ||
311 | public struct DSP_LOUDNESS_METER_INFO_TYPE | ||
312 | { | ||
313 | public float momentaryloudness; | ||
314 | public float shorttermloudness; | ||
315 | public float integratedloudness; | ||
316 | public float loudness10thpercentile; | ||
317 | public float loudness95thpercentile; | ||
318 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 66)] | ||
319 | public float[] loudnesshistogram; | ||
320 | public float maxtruepeak; | ||
321 | public float maxmomentaryloudness; | ||
322 | } | ||
323 | |||
324 | [StructLayout(LayoutKind.Sequential)] | ||
325 | public struct DSP_LOUDNESS_METER_WEIGHTING_TYPE | ||
326 | { | ||
327 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] | ||
328 | public float[] channelweight; | ||
329 | } | ||
330 | |||
331 | [StructLayout(LayoutKind.Sequential)] | ||
332 | public struct DSP_PARAMETER_ATTENUATION_RANGE | ||
333 | { | ||
334 | public float min; | ||
335 | public float max; | ||
336 | } | ||
337 | |||
338 | [StructLayout(LayoutKind.Sequential)] | ||
339 | public struct DSP_DESCRIPTION | ||
340 | { | ||
341 | public uint pluginsdkversion; | ||
342 | [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] | ||
343 | public byte[] name; | ||
344 | public uint version; | ||
345 | public int numinputbuffers; | ||
346 | public int numoutputbuffers; | ||
347 | public DSP_CREATECALLBACK create; | ||
348 | public DSP_RELEASECALLBACK release; | ||
349 | public DSP_RESETCALLBACK reset; | ||
350 | public DSP_READCALLBACK read; | ||
351 | public DSP_PROCESS_CALLBACK process; | ||
352 | public DSP_SETPOSITIONCALLBACK setposition; | ||
353 | |||
354 | public int numparameters; | ||
355 | public IntPtr paramdesc; | ||
356 | public DSP_SETPARAM_FLOAT_CALLBACK setparameterfloat; | ||
357 | public DSP_SETPARAM_INT_CALLBACK setparameterint; | ||
358 | public DSP_SETPARAM_BOOL_CALLBACK setparameterbool; | ||
359 | public DSP_SETPARAM_DATA_CALLBACK setparameterdata; | ||
360 | public DSP_GETPARAM_FLOAT_CALLBACK getparameterfloat; | ||
361 | public DSP_GETPARAM_INT_CALLBACK getparameterint; | ||
362 | public DSP_GETPARAM_BOOL_CALLBACK getparameterbool; | ||
363 | public DSP_GETPARAM_DATA_CALLBACK getparameterdata; | ||
364 | public DSP_SHOULDIPROCESS_CALLBACK shouldiprocess; | ||
365 | public IntPtr userdata; | ||
366 | |||
367 | public DSP_SYSTEM_REGISTER_CALLBACK sys_register; | ||
368 | public DSP_SYSTEM_DEREGISTER_CALLBACK sys_deregister; | ||
369 | public DSP_SYSTEM_MIX_CALLBACK sys_mix; | ||
370 | } | ||
371 | |||
372 | [StructLayout(LayoutKind.Sequential)] | ||
373 | public struct DSP_STATE_DFT_FUNCTIONS | ||
374 | { | ||
375 | public DSP_DFT_FFTREAL_FUNC fftreal; | ||
376 | public DSP_DFT_IFFTREAL_FUNC inversefftreal; | ||
377 | } | ||
378 | |||
379 | [StructLayout(LayoutKind.Sequential)] | ||
380 | public struct DSP_STATE_PAN_FUNCTIONS | ||
381 | { | ||
382 | public DSP_PAN_SUMMONOMATRIX_FUNC summonomatrix; | ||
383 | public DSP_PAN_SUMSTEREOMATRIX_FUNC sumstereomatrix; | ||
384 | public DSP_PAN_SUMSURROUNDMATRIX_FUNC sumsurroundmatrix; | ||
385 | public DSP_PAN_SUMMONOTOSURROUNDMATRIX_FUNC summonotosurroundmatrix; | ||
386 | public DSP_PAN_SUMSTEREOTOSURROUNDMATRIX_FUNC sumstereotosurroundmatrix; | ||
387 | public DSP_PAN_GETROLLOFFGAIN_FUNC getrolloffgain; | ||
388 | } | ||
389 | |||
390 | [StructLayout(LayoutKind.Sequential)] | ||
391 | public struct DSP_STATE_FUNCTIONS | ||
392 | { | ||
393 | public DSP_ALLOC_FUNC alloc; | ||
394 | public DSP_REALLOC_FUNC realloc; | ||
395 | public DSP_FREE_FUNC free; | ||
396 | public DSP_GETSAMPLERATE_FUNC getsamplerate; | ||
397 | public DSP_GETBLOCKSIZE_FUNC getblocksize; | ||
398 | public IntPtr dft; | ||
399 | public IntPtr pan; | ||
400 | public DSP_GETSPEAKERMODE_FUNC getspeakermode; | ||
401 | public DSP_GETCLOCK_FUNC getclock; | ||
402 | public DSP_GETLISTENERATTRIBUTES_FUNC getlistenerattributes; | ||
403 | public DSP_LOG_FUNC log; | ||
404 | public DSP_GETUSERDATA_FUNC getuserdata; | ||
405 | } | ||
406 | |||
407 | [StructLayout(LayoutKind.Sequential)] | ||
408 | public struct DSP_STATE | ||
409 | { | ||
410 | public IntPtr instance; | ||
411 | public IntPtr plugindata; | ||
412 | public uint channelmask; | ||
413 | public int source_speakermode; | ||
414 | public IntPtr sidechaindata; | ||
415 | public int sidechainchannels; | ||
416 | public IntPtr functions; | ||
417 | public int systemobject; | ||
418 | } | ||
419 | |||
420 | [StructLayout(LayoutKind.Sequential)] | ||
421 | public struct DSP_METERING_INFO | ||
422 | { | ||
423 | public int numsamples; | ||
424 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] | ||
425 | public float[] peaklevel; | ||
426 | [MarshalAs(UnmanagedType.ByValArray, SizeConst=32)] | ||
427 | public float[] rmslevel; | ||
428 | public short numchannels; | ||
429 | } | ||
430 | |||
431 | /* | ||
432 | ============================================================================================================== | ||
433 | |||
434 | FMOD built in effect parameters. | ||
435 | Use DSP::setParameter with these enums for the 'index' parameter. | ||
436 | |||
437 | ============================================================================================================== | ||
438 | */ | ||
439 | |||
440 | public enum DSP_OSCILLATOR : int | ||
441 | { | ||
442 | TYPE, | ||
443 | RATE | ||
444 | } | ||
445 | |||
446 | public enum DSP_LOWPASS : int | ||
447 | { | ||
448 | CUTOFF, | ||
449 | RESONANCE | ||
450 | } | ||
451 | |||
452 | public enum DSP_ITLOWPASS : int | ||
453 | { | ||
454 | CUTOFF, | ||
455 | RESONANCE | ||
456 | } | ||
457 | |||
458 | public enum DSP_HIGHPASS : int | ||
459 | { | ||
460 | CUTOFF, | ||
461 | RESONANCE | ||
462 | } | ||
463 | |||
464 | public enum DSP_ECHO : int | ||
465 | { | ||
466 | DELAY, | ||
467 | FEEDBACK, | ||
468 | DRYLEVEL, | ||
469 | WETLEVEL | ||
470 | } | ||
471 | |||
472 | public enum DSP_FADER : int | ||
473 | { | ||
474 | GAIN, | ||
475 | OVERALL_GAIN, | ||
476 | } | ||
477 | |||
478 | public enum DSP_DELAY : int | ||
479 | { | ||
480 | CH0, | ||
481 | CH1, | ||
482 | CH2, | ||
483 | CH3, | ||
484 | CH4, | ||
485 | CH5, | ||
486 | CH6, | ||
487 | CH7, | ||
488 | CH8, | ||
489 | CH9, | ||
490 | CH10, | ||
491 | CH11, | ||
492 | CH12, | ||
493 | CH13, | ||
494 | CH14, | ||
495 | CH15, | ||
496 | MAXDELAY, | ||
497 | } | ||
498 | |||
499 | public enum DSP_FLANGE : int | ||
500 | { | ||
501 | MIX, | ||
502 | DEPTH, | ||
503 | RATE | ||
504 | } | ||
505 | |||
506 | public enum DSP_TREMOLO : int | ||
507 | { | ||
508 | FREQUENCY, | ||
509 | DEPTH, | ||
510 | SHAPE, | ||
511 | SKEW, | ||
512 | DUTY, | ||
513 | SQUARE, | ||
514 | PHASE, | ||
515 | SPREAD | ||
516 | } | ||
517 | |||
518 | public enum DSP_DISTORTION : int | ||
519 | { | ||
520 | LEVEL | ||
521 | } | ||
522 | |||
523 | public enum DSP_NORMALIZE : int | ||
524 | { | ||
525 | FADETIME, | ||
526 | THRESHOLD, | ||
527 | MAXAMP | ||
528 | } | ||
529 | |||
530 | public enum DSP_LIMITER : int | ||
531 | { | ||
532 | RELEASETIME, | ||
533 | CEILING, | ||
534 | MAXIMIZERGAIN, | ||
535 | MODE, | ||
536 | } | ||
537 | |||
538 | public enum DSP_PARAMEQ : int | ||
539 | { | ||
540 | CENTER, | ||
541 | BANDWIDTH, | ||
542 | GAIN | ||
543 | } | ||
544 | |||
545 | public enum DSP_MULTIBAND_EQ : int | ||
546 | { | ||
547 | A_FILTER, | ||
548 | A_FREQUENCY, | ||
549 | A_Q, | ||
550 | A_GAIN, | ||
551 | B_FILTER, | ||
552 | B_FREQUENCY, | ||
553 | B_Q, | ||
554 | B_GAIN, | ||
555 | C_FILTER, | ||
556 | C_FREQUENCY, | ||
557 | C_Q, | ||
558 | C_GAIN, | ||
559 | D_FILTER, | ||
560 | D_FREQUENCY, | ||
561 | D_Q, | ||
562 | D_GAIN, | ||
563 | E_FILTER, | ||
564 | E_FREQUENCY, | ||
565 | E_Q, | ||
566 | E_GAIN, | ||
567 | } | ||
568 | |||
569 | public enum DSP_MULTIBAND_EQ_FILTER_TYPE : int | ||
570 | { | ||
571 | DISABLED, | ||
572 | LOWPASS_12DB, | ||
573 | LOWPASS_24DB, | ||
574 | LOWPASS_48DB, | ||
575 | HIGHPASS_12DB, | ||
576 | HIGHPASS_24DB, | ||
577 | HIGHPASS_48DB, | ||
578 | LOWSHELF, | ||
579 | HIGHSHELF, | ||
580 | PEAKING, | ||
581 | BANDPASS, | ||
582 | NOTCH, | ||
583 | ALLPASS, | ||
584 | } | ||
585 | |||
586 | public enum DSP_PITCHSHIFT : int | ||
587 | { | ||
588 | PITCH, | ||
589 | FFTSIZE, | ||
590 | OVERLAP, | ||
591 | MAXCHANNELS | ||
592 | } | ||
593 | |||
594 | public enum DSP_CHORUS : int | ||
595 | { | ||
596 | MIX, | ||
597 | RATE, | ||
598 | DEPTH, | ||
599 | } | ||
600 | |||
601 | public enum DSP_ITECHO : int | ||
602 | { | ||
603 | WETDRYMIX, | ||
604 | FEEDBACK, | ||
605 | LEFTDELAY, | ||
606 | RIGHTDELAY, | ||
607 | PANDELAY | ||
608 | } | ||
609 | |||
610 | public enum DSP_COMPRESSOR : int | ||
611 | { | ||
612 | THRESHOLD, | ||
613 | RATIO, | ||
614 | ATTACK, | ||
615 | RELEASE, | ||
616 | GAINMAKEUP, | ||
617 | USESIDECHAIN, | ||
618 | LINKED | ||
619 | } | ||
620 | |||
621 | public enum DSP_SFXREVERB : int | ||
622 | { | ||
623 | DECAYTIME, | ||
624 | EARLYDELAY, | ||
625 | LATEDELAY, | ||
626 | HFREFERENCE, | ||
627 | HFDECAYRATIO, | ||
628 | DIFFUSION, | ||
629 | DENSITY, | ||
630 | LOWSHELFFREQUENCY, | ||
631 | LOWSHELFGAIN, | ||
632 | HIGHCUT, | ||
633 | EARLYLATEMIX, | ||
634 | WETLEVEL, | ||
635 | DRYLEVEL | ||
636 | } | ||
637 | |||
638 | public enum DSP_LOWPASS_SIMPLE : int | ||
639 | { | ||
640 | CUTOFF | ||
641 | } | ||
642 | |||
643 | public enum DSP_SEND : int | ||
644 | { | ||
645 | RETURNID, | ||
646 | LEVEL, | ||
647 | } | ||
648 | |||
649 | public enum DSP_RETURN : int | ||
650 | { | ||
651 | ID, | ||
652 | INPUT_SPEAKER_MODE | ||
653 | } | ||
654 | |||
655 | public enum DSP_HIGHPASS_SIMPLE : int | ||
656 | { | ||
657 | CUTOFF | ||
658 | } | ||
659 | |||
660 | public enum DSP_PAN_2D_STEREO_MODE_TYPE : int | ||
661 | { | ||
662 | DISTRIBUTED, | ||
663 | DISCRETE | ||
664 | } | ||
665 | |||
666 | public enum DSP_PAN_MODE_TYPE : int | ||
667 | { | ||
668 | MONO, | ||
669 | STEREO, | ||
670 | SURROUND | ||
671 | } | ||
672 | |||
673 | public enum DSP_PAN_3D_ROLLOFF_TYPE : int | ||
674 | { | ||
675 | LINEARSQUARED, | ||
676 | LINEAR, | ||
677 | INVERSE, | ||
678 | INVERSETAPERED, | ||
679 | CUSTOM | ||
680 | } | ||
681 | |||
682 | public enum DSP_PAN_3D_EXTENT_MODE_TYPE : int | ||
683 | { | ||
684 | AUTO, | ||
685 | USER, | ||
686 | OFF | ||
687 | } | ||
688 | |||
689 | public enum DSP_PAN : int | ||
690 | { | ||
691 | MODE, | ||
692 | _2D_STEREO_POSITION, | ||
693 | _2D_DIRECTION, | ||
694 | _2D_EXTENT, | ||
695 | _2D_ROTATION, | ||
696 | _2D_LFE_LEVEL, | ||
697 | _2D_STEREO_MODE, | ||
698 | _2D_STEREO_SEPARATION, | ||
699 | _2D_STEREO_AXIS, | ||
700 | ENABLED_SPEAKERS, | ||
701 | _3D_POSITION, | ||
702 | _3D_ROLLOFF, | ||
703 | _3D_MIN_DISTANCE, | ||
704 | _3D_MAX_DISTANCE, | ||
705 | _3D_EXTENT_MODE, | ||
706 | _3D_SOUND_SIZE, | ||
707 | _3D_MIN_EXTENT, | ||
708 | _3D_PAN_BLEND, | ||
709 | LFE_UPMIX_ENABLED, | ||
710 | OVERALL_GAIN, | ||
711 | SURROUND_SPEAKER_MODE, | ||
712 | _2D_HEIGHT_BLEND, | ||
713 | ATTENUATION_RANGE, | ||
714 | OVERRIDE_RANGE | ||
715 | } | ||
716 | |||
717 | public enum DSP_THREE_EQ_CROSSOVERSLOPE_TYPE : int | ||
718 | { | ||
719 | _12DB, | ||
720 | _24DB, | ||
721 | _48DB | ||
722 | } | ||
723 | |||
724 | public enum DSP_THREE_EQ : int | ||
725 | { | ||
726 | LOWGAIN, | ||
727 | MIDGAIN, | ||
728 | HIGHGAIN, | ||
729 | LOWCROSSOVER, | ||
730 | HIGHCROSSOVER, | ||
731 | CROSSOVERSLOPE | ||
732 | } | ||
733 | |||
734 | public enum DSP_FFT_WINDOW : int | ||
735 | { | ||
736 | RECT, | ||
737 | TRIANGLE, | ||
738 | HAMMING, | ||
739 | HANNING, | ||
740 | BLACKMAN, | ||
741 | BLACKMANHARRIS | ||
742 | } | ||
743 | |||
744 | public enum DSP_FFT : int | ||
745 | { | ||
746 | WINDOWSIZE, | ||
747 | WINDOWTYPE, | ||
748 | SPECTRUMDATA, | ||
749 | DOMINANT_FREQ | ||
750 | } | ||
751 | |||
752 | |||
753 | public enum DSP_LOUDNESS_METER : int | ||
754 | { | ||
755 | STATE, | ||
756 | WEIGHTING, | ||
757 | INFO | ||
758 | } | ||
759 | |||
760 | |||
761 | public enum DSP_LOUDNESS_METER_STATE_TYPE : int | ||
762 | { | ||
763 | RESET_INTEGRATED = -3, | ||
764 | RESET_MAXPEAK = -2, | ||
765 | RESET_ALL = -1, | ||
766 | PAUSED = 0, | ||
767 | ANALYZING = 1 | ||
768 | } | ||
769 | |||
770 | public enum DSP_ENVELOPEFOLLOWER : int | ||
771 | { | ||
772 | ATTACK, | ||
773 | RELEASE, | ||
774 | ENVELOPE, | ||
775 | USESIDECHAIN | ||
776 | } | ||
777 | |||
778 | public enum DSP_CONVOLUTION_REVERB : int | ||
779 | { | ||
780 | IR, | ||
781 | WET, | ||
782 | DRY, | ||
783 | LINKED | ||
784 | } | ||
785 | |||
786 | public enum DSP_CHANNELMIX_OUTPUT : int | ||
787 | { | ||
788 | DEFAULT, | ||
789 | ALLMONO, | ||
790 | ALLSTEREO, | ||
791 | ALLQUAD, | ||
792 | ALL5POINT1, | ||
793 | ALL7POINT1, | ||
794 | ALLLFE, | ||
795 | ALL7POINT1POINT4 | ||
796 | } | ||
797 | |||
798 | public enum DSP_CHANNELMIX : int | ||
799 | { | ||
800 | OUTPUTGROUPING, | ||
801 | GAIN_CH0, | ||
802 | GAIN_CH1, | ||
803 | GAIN_CH2, | ||
804 | GAIN_CH3, | ||
805 | GAIN_CH4, | ||
806 | GAIN_CH5, | ||
807 | GAIN_CH6, | ||
808 | GAIN_CH7, | ||
809 | GAIN_CH8, | ||
810 | GAIN_CH9, | ||
811 | GAIN_CH10, | ||
812 | GAIN_CH11, | ||
813 | GAIN_CH12, | ||
814 | GAIN_CH13, | ||
815 | GAIN_CH14, | ||
816 | GAIN_CH15, | ||
817 | GAIN_CH16, | ||
818 | GAIN_CH17, | ||
819 | GAIN_CH18, | ||
820 | GAIN_CH19, | ||
821 | GAIN_CH20, | ||
822 | GAIN_CH21, | ||
823 | GAIN_CH22, | ||
824 | GAIN_CH23, | ||
825 | GAIN_CH24, | ||
826 | GAIN_CH25, | ||
827 | GAIN_CH26, | ||
828 | GAIN_CH27, | ||
829 | GAIN_CH28, | ||
830 | GAIN_CH29, | ||
831 | GAIN_CH30, | ||
832 | GAIN_CH31, | ||
833 | OUTPUT_CH0, | ||
834 | OUTPUT_CH1, | ||
835 | OUTPUT_CH2, | ||
836 | OUTPUT_CH3, | ||
837 | OUTPUT_CH4, | ||
838 | OUTPUT_CH5, | ||
839 | OUTPUT_CH6, | ||
840 | OUTPUT_CH7, | ||
841 | OUTPUT_CH8, | ||
842 | OUTPUT_CH9, | ||
843 | OUTPUT_CH10, | ||
844 | OUTPUT_CH11, | ||
845 | OUTPUT_CH12, | ||
846 | OUTPUT_CH13, | ||
847 | OUTPUT_CH14, | ||
848 | OUTPUT_CH15, | ||
849 | OUTPUT_CH16, | ||
850 | OUTPUT_CH17, | ||
851 | OUTPUT_CH18, | ||
852 | OUTPUT_CH19, | ||
853 | OUTPUT_CH20, | ||
854 | OUTPUT_CH21, | ||
855 | OUTPUT_CH22, | ||
856 | OUTPUT_CH23, | ||
857 | OUTPUT_CH24, | ||
858 | OUTPUT_CH25, | ||
859 | OUTPUT_CH26, | ||
860 | OUTPUT_CH27, | ||
861 | OUTPUT_CH28, | ||
862 | OUTPUT_CH29, | ||
863 | OUTPUT_CH30, | ||
864 | OUTPUT_CH31, | ||
865 | } | ||
866 | |||
867 | public enum DSP_TRANSCEIVER_SPEAKERMODE : int | ||
868 | { | ||
869 | AUTO = -1, | ||
870 | MONO = 0, | ||
871 | STEREO, | ||
872 | SURROUND, | ||
873 | } | ||
874 | |||
875 | public enum DSP_TRANSCEIVER : int | ||
876 | { | ||
877 | TRANSMIT, | ||
878 | GAIN, | ||
879 | CHANNEL, | ||
880 | TRANSMITSPEAKERMODE | ||
881 | } | ||
882 | |||
883 | public enum DSP_OBJECTPAN : int | ||
884 | { | ||
885 | _3D_POSITION, | ||
886 | _3D_ROLLOFF, | ||
887 | _3D_MIN_DISTANCE, | ||
888 | _3D_MAX_DISTANCE, | ||
889 | _3D_EXTENT_MODE, | ||
890 | _3D_SOUND_SIZE, | ||
891 | _3D_MIN_EXTENT, | ||
892 | OVERALL_GAIN, | ||
893 | OUTPUTGAIN, | ||
894 | ATTENUATION_RANGE, | ||
895 | OVERRIDE_RANGE | ||
896 | } | ||
897 | } | ||