fmod_dsp.cs 28 KB

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