fmod_common.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899
  1. /* ======================================================================================== */
  2. /* FMOD Core API - Common C/C++ header file. */
  3. /* Copyright (c), Firelight Technologies Pty, Ltd. 2004-2024. */
  4. /* */
  5. /* This header is included by fmod.hpp (C++ interface) and fmod.h (C interface) */
  6. /* */
  7. /* For more detail visit: */
  8. /* https://fmod.com/docs/2.03/api/core-api-common.html */
  9. /* ======================================================================================== */
  10. #ifndef _FMOD_COMMON_H
  11. #define _FMOD_COMMON_H
  12. /*
  13. Library import helpers
  14. */
  15. #if defined(_WIN32) || defined(__CYGWIN__)
  16. #define F_CALL __stdcall
  17. #else
  18. #define F_CALL
  19. #endif
  20. #if defined(_WIN32) || defined(__CYGWIN__) || defined(__ORBIS__) || defined(F_USE_DECLSPEC)
  21. #define F_EXPORT __declspec(dllexport)
  22. #elif defined(__APPLE__) || defined(__ANDROID__) || defined(__linux__) || defined(F_USE_ATTRIBUTE)
  23. #define F_EXPORT __attribute__((visibility("default")))
  24. #else
  25. #define F_EXPORT
  26. #endif
  27. #ifdef DLL_EXPORTS
  28. #define F_API F_EXPORT F_CALL
  29. #else
  30. #define F_API F_CALL
  31. #endif
  32. /*
  33. FMOD core types
  34. */
  35. typedef int FMOD_BOOL;
  36. typedef struct FMOD_SYSTEM FMOD_SYSTEM;
  37. typedef struct FMOD_SOUND FMOD_SOUND;
  38. typedef struct FMOD_CHANNELCONTROL FMOD_CHANNELCONTROL;
  39. typedef struct FMOD_CHANNEL FMOD_CHANNEL;
  40. typedef struct FMOD_CHANNELGROUP FMOD_CHANNELGROUP;
  41. typedef struct FMOD_SOUNDGROUP FMOD_SOUNDGROUP;
  42. typedef struct FMOD_REVERB3D FMOD_REVERB3D;
  43. typedef struct FMOD_DSP FMOD_DSP;
  44. typedef struct FMOD_DSPCONNECTION FMOD_DSPCONNECTION;
  45. typedef struct FMOD_POLYGON FMOD_POLYGON;
  46. typedef struct FMOD_GEOMETRY FMOD_GEOMETRY;
  47. typedef struct FMOD_SYNCPOINT FMOD_SYNCPOINT;
  48. typedef struct FMOD_ASYNCREADINFO FMOD_ASYNCREADINFO;
  49. /*
  50. FMOD constants
  51. */
  52. #define FMOD_VERSION 0x00020302 /* 0xaaaabbcc -> aaaa = product version, bb = major version, cc = minor version.*/
  53. #define FMOD_BUILDNUMBER 144646
  54. typedef unsigned int FMOD_DEBUG_FLAGS;
  55. #define FMOD_DEBUG_LEVEL_NONE 0x00000000
  56. #define FMOD_DEBUG_LEVEL_ERROR 0x00000001
  57. #define FMOD_DEBUG_LEVEL_WARNING 0x00000002
  58. #define FMOD_DEBUG_LEVEL_LOG 0x00000004
  59. #define FMOD_DEBUG_TYPE_MEMORY 0x00000100
  60. #define FMOD_DEBUG_TYPE_FILE 0x00000200
  61. #define FMOD_DEBUG_TYPE_CODEC 0x00000400
  62. #define FMOD_DEBUG_TYPE_TRACE 0x00000800
  63. #define FMOD_DEBUG_DISPLAY_TIMESTAMPS 0x00010000
  64. #define FMOD_DEBUG_DISPLAY_LINENUMBERS 0x00020000
  65. #define FMOD_DEBUG_DISPLAY_THREAD 0x00040000
  66. typedef unsigned int FMOD_MEMORY_TYPE;
  67. #define FMOD_MEMORY_NORMAL 0x00000000
  68. #define FMOD_MEMORY_STREAM_FILE 0x00000001
  69. #define FMOD_MEMORY_STREAM_DECODE 0x00000002
  70. #define FMOD_MEMORY_SAMPLEDATA 0x00000004
  71. #define FMOD_MEMORY_DSP_BUFFER 0x00000008
  72. #define FMOD_MEMORY_PLUGIN 0x00000010
  73. #define FMOD_MEMORY_PERSISTENT 0x00200000
  74. #define FMOD_MEMORY_ALL 0xFFFFFFFF
  75. typedef unsigned int FMOD_INITFLAGS;
  76. #define FMOD_INIT_NORMAL 0x00000000
  77. #define FMOD_INIT_STREAM_FROM_UPDATE 0x00000001
  78. #define FMOD_INIT_MIX_FROM_UPDATE 0x00000002
  79. #define FMOD_INIT_3D_RIGHTHANDED 0x00000004
  80. #define FMOD_INIT_CLIP_OUTPUT 0x00000008
  81. #define FMOD_INIT_CHANNEL_LOWPASS 0x00000100
  82. #define FMOD_INIT_CHANNEL_DISTANCEFILTER 0x00000200
  83. #define FMOD_INIT_PROFILE_ENABLE 0x00010000
  84. #define FMOD_INIT_VOL0_BECOMES_VIRTUAL 0x00020000
  85. #define FMOD_INIT_GEOMETRY_USECLOSEST 0x00040000
  86. #define FMOD_INIT_PREFER_DOLBY_DOWNMIX 0x00080000
  87. #define FMOD_INIT_THREAD_UNSAFE 0x00100000
  88. #define FMOD_INIT_PROFILE_METER_ALL 0x00200000
  89. #define FMOD_INIT_MEMORY_TRACKING 0x00400000
  90. typedef unsigned int FMOD_DRIVER_STATE;
  91. #define FMOD_DRIVER_STATE_CONNECTED 0x00000001
  92. #define FMOD_DRIVER_STATE_DEFAULT 0x00000002
  93. typedef unsigned int FMOD_TIMEUNIT;
  94. #define FMOD_TIMEUNIT_MS 0x00000001
  95. #define FMOD_TIMEUNIT_PCM 0x00000002
  96. #define FMOD_TIMEUNIT_PCMBYTES 0x00000004
  97. #define FMOD_TIMEUNIT_RAWBYTES 0x00000008
  98. #define FMOD_TIMEUNIT_PCMFRACTION 0x00000010
  99. #define FMOD_TIMEUNIT_MODORDER 0x00000100
  100. #define FMOD_TIMEUNIT_MODROW 0x00000200
  101. #define FMOD_TIMEUNIT_MODPATTERN 0x00000400
  102. typedef unsigned int FMOD_SYSTEM_CALLBACK_TYPE;
  103. #define FMOD_SYSTEM_CALLBACK_DEVICELISTCHANGED 0x00000001
  104. #define FMOD_SYSTEM_CALLBACK_DEVICELOST 0x00000002
  105. #define FMOD_SYSTEM_CALLBACK_MEMORYALLOCATIONFAILED 0x00000004
  106. #define FMOD_SYSTEM_CALLBACK_THREADCREATED 0x00000008
  107. #define FMOD_SYSTEM_CALLBACK_BADDSPCONNECTION 0x00000010
  108. #define FMOD_SYSTEM_CALLBACK_PREMIX 0x00000020
  109. #define FMOD_SYSTEM_CALLBACK_POSTMIX 0x00000040
  110. #define FMOD_SYSTEM_CALLBACK_ERROR 0x00000080
  111. #define FMOD_SYSTEM_CALLBACK_THREADDESTROYED 0x00000100
  112. #define FMOD_SYSTEM_CALLBACK_PREUPDATE 0x00000200
  113. #define FMOD_SYSTEM_CALLBACK_POSTUPDATE 0x00000400
  114. #define FMOD_SYSTEM_CALLBACK_RECORDLISTCHANGED 0x00000800
  115. #define FMOD_SYSTEM_CALLBACK_BUFFEREDNOMIX 0x00001000
  116. #define FMOD_SYSTEM_CALLBACK_DEVICEREINITIALIZE 0x00002000
  117. #define FMOD_SYSTEM_CALLBACK_OUTPUTUNDERRUN 0x00004000
  118. #define FMOD_SYSTEM_CALLBACK_RECORDPOSITIONCHANGED 0x00008000
  119. #define FMOD_SYSTEM_CALLBACK_ALL 0xFFFFFFFF
  120. typedef unsigned int FMOD_MODE;
  121. #define FMOD_DEFAULT 0x00000000
  122. #define FMOD_LOOP_OFF 0x00000001
  123. #define FMOD_LOOP_NORMAL 0x00000002
  124. #define FMOD_LOOP_BIDI 0x00000004
  125. #define FMOD_2D 0x00000008
  126. #define FMOD_3D 0x00000010
  127. #define FMOD_CREATESTREAM 0x00000080
  128. #define FMOD_CREATESAMPLE 0x00000100
  129. #define FMOD_CREATECOMPRESSEDSAMPLE 0x00000200
  130. #define FMOD_OPENUSER 0x00000400
  131. #define FMOD_OPENMEMORY 0x00000800
  132. #define FMOD_OPENMEMORY_POINT 0x10000000
  133. #define FMOD_OPENRAW 0x00001000
  134. #define FMOD_OPENONLY 0x00002000
  135. #define FMOD_ACCURATETIME 0x00004000
  136. #define FMOD_MPEGSEARCH 0x00008000
  137. #define FMOD_NONBLOCKING 0x00010000
  138. #define FMOD_UNIQUE 0x00020000
  139. #define FMOD_3D_HEADRELATIVE 0x00040000
  140. #define FMOD_3D_WORLDRELATIVE 0x00080000
  141. #define FMOD_3D_INVERSEROLLOFF 0x00100000
  142. #define FMOD_3D_LINEARROLLOFF 0x00200000
  143. #define FMOD_3D_LINEARSQUAREROLLOFF 0x00400000
  144. #define FMOD_3D_INVERSETAPEREDROLLOFF 0x00800000
  145. #define FMOD_3D_CUSTOMROLLOFF 0x04000000
  146. #define FMOD_3D_IGNOREGEOMETRY 0x40000000
  147. #define FMOD_IGNORETAGS 0x02000000
  148. #define FMOD_LOWMEM 0x08000000
  149. #define FMOD_VIRTUAL_PLAYFROMSTART 0x80000000
  150. typedef unsigned int FMOD_CHANNELMASK;
  151. #define FMOD_CHANNELMASK_FRONT_LEFT 0x00000001
  152. #define FMOD_CHANNELMASK_FRONT_RIGHT 0x00000002
  153. #define FMOD_CHANNELMASK_FRONT_CENTER 0x00000004
  154. #define FMOD_CHANNELMASK_LOW_FREQUENCY 0x00000008
  155. #define FMOD_CHANNELMASK_SURROUND_LEFT 0x00000010
  156. #define FMOD_CHANNELMASK_SURROUND_RIGHT 0x00000020
  157. #define FMOD_CHANNELMASK_BACK_LEFT 0x00000040
  158. #define FMOD_CHANNELMASK_BACK_RIGHT 0x00000080
  159. #define FMOD_CHANNELMASK_BACK_CENTER 0x00000100
  160. #define FMOD_CHANNELMASK_MONO (FMOD_CHANNELMASK_FRONT_LEFT)
  161. #define FMOD_CHANNELMASK_STEREO (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT)
  162. #define FMOD_CHANNELMASK_LRC (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER)
  163. #define FMOD_CHANNELMASK_QUAD (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
  164. #define FMOD_CHANNELMASK_SURROUND (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
  165. #define FMOD_CHANNELMASK_5POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT)
  166. #define FMOD_CHANNELMASK_5POINT1_REARS (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
  167. #define FMOD_CHANNELMASK_7POINT0 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
  168. #define FMOD_CHANNELMASK_7POINT1 (FMOD_CHANNELMASK_FRONT_LEFT | FMOD_CHANNELMASK_FRONT_RIGHT | FMOD_CHANNELMASK_FRONT_CENTER | FMOD_CHANNELMASK_LOW_FREQUENCY | FMOD_CHANNELMASK_SURROUND_LEFT | FMOD_CHANNELMASK_SURROUND_RIGHT | FMOD_CHANNELMASK_BACK_LEFT | FMOD_CHANNELMASK_BACK_RIGHT)
  169. typedef unsigned long long FMOD_PORT_INDEX;
  170. #define FMOD_PORT_INDEX_NONE 0xFFFFFFFFFFFFFFFF
  171. typedef int FMOD_THREAD_PRIORITY;
  172. /* Platform specific priority range */
  173. #define FMOD_THREAD_PRIORITY_PLATFORM_MIN (-32 * 1024)
  174. #define FMOD_THREAD_PRIORITY_PLATFORM_MAX ( 32 * 1024)
  175. /* Platform agnostic priorities, maps internally to platform specific value */
  176. #define FMOD_THREAD_PRIORITY_DEFAULT (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 1)
  177. #define FMOD_THREAD_PRIORITY_LOW (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 2)
  178. #define FMOD_THREAD_PRIORITY_MEDIUM (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 3)
  179. #define FMOD_THREAD_PRIORITY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 4)
  180. #define FMOD_THREAD_PRIORITY_VERY_HIGH (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 5)
  181. #define FMOD_THREAD_PRIORITY_EXTREME (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 6)
  182. #define FMOD_THREAD_PRIORITY_CRITICAL (FMOD_THREAD_PRIORITY_PLATFORM_MIN - 7)
  183. /* Thread defaults */
  184. #define FMOD_THREAD_PRIORITY_MIXER FMOD_THREAD_PRIORITY_EXTREME
  185. #define FMOD_THREAD_PRIORITY_FEEDER FMOD_THREAD_PRIORITY_CRITICAL
  186. #define FMOD_THREAD_PRIORITY_STREAM FMOD_THREAD_PRIORITY_VERY_HIGH
  187. #define FMOD_THREAD_PRIORITY_FILE FMOD_THREAD_PRIORITY_HIGH
  188. #define FMOD_THREAD_PRIORITY_NONBLOCKING FMOD_THREAD_PRIORITY_HIGH
  189. #define FMOD_THREAD_PRIORITY_RECORD FMOD_THREAD_PRIORITY_HIGH
  190. #define FMOD_THREAD_PRIORITY_GEOMETRY FMOD_THREAD_PRIORITY_LOW
  191. #define FMOD_THREAD_PRIORITY_PROFILER FMOD_THREAD_PRIORITY_MEDIUM
  192. #define FMOD_THREAD_PRIORITY_STUDIO_UPDATE FMOD_THREAD_PRIORITY_MEDIUM
  193. #define FMOD_THREAD_PRIORITY_STUDIO_LOAD_BANK FMOD_THREAD_PRIORITY_MEDIUM
  194. #define FMOD_THREAD_PRIORITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_PRIORITY_MEDIUM
  195. #define FMOD_THREAD_PRIORITY_CONVOLUTION1 FMOD_THREAD_PRIORITY_VERY_HIGH
  196. #define FMOD_THREAD_PRIORITY_CONVOLUTION2 FMOD_THREAD_PRIORITY_VERY_HIGH
  197. typedef unsigned int FMOD_THREAD_STACK_SIZE;
  198. #define FMOD_THREAD_STACK_SIZE_DEFAULT 0
  199. #define FMOD_THREAD_STACK_SIZE_MIXER (80 * 1024)
  200. #define FMOD_THREAD_STACK_SIZE_FEEDER (16 * 1024)
  201. #define FMOD_THREAD_STACK_SIZE_STREAM (96 * 1024)
  202. #define FMOD_THREAD_STACK_SIZE_FILE (64 * 1024)
  203. #define FMOD_THREAD_STACK_SIZE_NONBLOCKING (112 * 1024)
  204. #define FMOD_THREAD_STACK_SIZE_RECORD (16 * 1024)
  205. #define FMOD_THREAD_STACK_SIZE_GEOMETRY (48 * 1024)
  206. #define FMOD_THREAD_STACK_SIZE_PROFILER (128 * 1024)
  207. #define FMOD_THREAD_STACK_SIZE_STUDIO_UPDATE (96 * 1024)
  208. #define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_BANK (96 * 1024)
  209. #define FMOD_THREAD_STACK_SIZE_STUDIO_LOAD_SAMPLE (96 * 1024)
  210. #define FMOD_THREAD_STACK_SIZE_CONVOLUTION1 (16 * 1024)
  211. #define FMOD_THREAD_STACK_SIZE_CONVOLUTION2 (16 * 1024)
  212. typedef long long FMOD_THREAD_AFFINITY;
  213. /* Platform agnostic thread groupings */
  214. #define FMOD_THREAD_AFFINITY_GROUP_DEFAULT 0x4000000000000000
  215. #define FMOD_THREAD_AFFINITY_GROUP_A 0x4000000000000001
  216. #define FMOD_THREAD_AFFINITY_GROUP_B 0x4000000000000002
  217. #define FMOD_THREAD_AFFINITY_GROUP_C 0x4000000000000003
  218. /* Thread defaults */
  219. #define FMOD_THREAD_AFFINITY_MIXER FMOD_THREAD_AFFINITY_GROUP_A
  220. #define FMOD_THREAD_AFFINITY_FEEDER FMOD_THREAD_AFFINITY_GROUP_C
  221. #define FMOD_THREAD_AFFINITY_STREAM FMOD_THREAD_AFFINITY_GROUP_C
  222. #define FMOD_THREAD_AFFINITY_FILE FMOD_THREAD_AFFINITY_GROUP_C
  223. #define FMOD_THREAD_AFFINITY_NONBLOCKING FMOD_THREAD_AFFINITY_GROUP_C
  224. #define FMOD_THREAD_AFFINITY_RECORD FMOD_THREAD_AFFINITY_GROUP_C
  225. #define FMOD_THREAD_AFFINITY_GEOMETRY FMOD_THREAD_AFFINITY_GROUP_C
  226. #define FMOD_THREAD_AFFINITY_PROFILER FMOD_THREAD_AFFINITY_GROUP_C
  227. #define FMOD_THREAD_AFFINITY_STUDIO_UPDATE FMOD_THREAD_AFFINITY_GROUP_B
  228. #define FMOD_THREAD_AFFINITY_STUDIO_LOAD_BANK FMOD_THREAD_AFFINITY_GROUP_C
  229. #define FMOD_THREAD_AFFINITY_STUDIO_LOAD_SAMPLE FMOD_THREAD_AFFINITY_GROUP_C
  230. #define FMOD_THREAD_AFFINITY_CONVOLUTION1 FMOD_THREAD_AFFINITY_GROUP_C
  231. #define FMOD_THREAD_AFFINITY_CONVOLUTION2 FMOD_THREAD_AFFINITY_GROUP_C
  232. /* Core mask, valid up to 1 << 62 */
  233. #define FMOD_THREAD_AFFINITY_CORE_ALL 0
  234. #define FMOD_THREAD_AFFINITY_CORE_0 (1 << 0)
  235. #define FMOD_THREAD_AFFINITY_CORE_1 (1 << 1)
  236. #define FMOD_THREAD_AFFINITY_CORE_2 (1 << 2)
  237. #define FMOD_THREAD_AFFINITY_CORE_3 (1 << 3)
  238. #define FMOD_THREAD_AFFINITY_CORE_4 (1 << 4)
  239. #define FMOD_THREAD_AFFINITY_CORE_5 (1 << 5)
  240. #define FMOD_THREAD_AFFINITY_CORE_6 (1 << 6)
  241. #define FMOD_THREAD_AFFINITY_CORE_7 (1 << 7)
  242. #define FMOD_THREAD_AFFINITY_CORE_8 (1 << 8)
  243. #define FMOD_THREAD_AFFINITY_CORE_9 (1 << 9)
  244. #define FMOD_THREAD_AFFINITY_CORE_10 (1 << 10)
  245. #define FMOD_THREAD_AFFINITY_CORE_11 (1 << 11)
  246. #define FMOD_THREAD_AFFINITY_CORE_12 (1 << 12)
  247. #define FMOD_THREAD_AFFINITY_CORE_13 (1 << 13)
  248. #define FMOD_THREAD_AFFINITY_CORE_14 (1 << 14)
  249. #define FMOD_THREAD_AFFINITY_CORE_15 (1 << 15)
  250. /* Preset for FMOD_REVERB_PROPERTIES */
  251. #define FMOD_PRESET_OFF { 1000, 7, 11, 5000, 100, 100, 100, 250, 0, 20, 96, -80.0f }
  252. #define FMOD_PRESET_GENERIC { 1500, 7, 11, 5000, 83, 100, 100, 250, 0, 14500, 96, -8.0f }
  253. #define FMOD_PRESET_PADDEDCELL { 170, 1, 2, 5000, 10, 100, 100, 250, 0, 160, 84, -7.8f }
  254. #define FMOD_PRESET_ROOM { 400, 2, 3, 5000, 83, 100, 100, 250, 0, 6050, 88, -9.4f }
  255. #define FMOD_PRESET_BATHROOM { 1500, 7, 11, 5000, 54, 100, 60, 250, 0, 2900, 83, 0.5f }
  256. #define FMOD_PRESET_LIVINGROOM { 500, 3, 4, 5000, 10, 100, 100, 250, 0, 160, 58, -19.0f }
  257. #define FMOD_PRESET_STONEROOM { 2300, 12, 17, 5000, 64, 100, 100, 250, 0, 7800, 71, -8.5f }
  258. #define FMOD_PRESET_AUDITORIUM { 4300, 20, 30, 5000, 59, 100, 100, 250, 0, 5850, 64, -11.7f }
  259. #define FMOD_PRESET_CONCERTHALL { 3900, 20, 29, 5000, 70, 100, 100, 250, 0, 5650, 80, -9.8f }
  260. #define FMOD_PRESET_CAVE { 2900, 15, 22, 5000, 100, 100, 100, 250, 0, 20000, 59, -11.3f }
  261. #define FMOD_PRESET_ARENA { 7200, 20, 30, 5000, 33, 100, 100, 250, 0, 4500, 80, -9.6f }
  262. #define FMOD_PRESET_HANGAR { 10000, 20, 30, 5000, 23, 100, 100, 250, 0, 3400, 72, -7.4f }
  263. #define FMOD_PRESET_CARPETTEDHALLWAY { 300, 2, 30, 5000, 10, 100, 100, 250, 0, 500, 56, -24.0f }
  264. #define FMOD_PRESET_HALLWAY { 1500, 7, 11, 5000, 59, 100, 100, 250, 0, 7800, 87, -5.5f }
  265. #define FMOD_PRESET_STONECORRIDOR { 270, 13, 20, 5000, 79, 100, 100, 250, 0, 9000, 86, -6.0f }
  266. #define FMOD_PRESET_ALLEY { 1500, 7, 11, 5000, 86, 100, 100, 250, 0, 8300, 80, -9.8f }
  267. #define FMOD_PRESET_FOREST { 1500, 162, 88, 5000, 54, 79, 100, 250, 0, 760, 94, -12.3f }
  268. #define FMOD_PRESET_CITY { 1500, 7, 11, 5000, 67, 50, 100, 250, 0, 4050, 66, -26.0f }
  269. #define FMOD_PRESET_MOUNTAINS { 1500, 300, 100, 5000, 21, 27, 100, 250, 0, 1220, 82, -24.0f }
  270. #define FMOD_PRESET_QUARRY { 1500, 61, 25, 5000, 83, 100, 100, 250, 0, 3400, 100, -5.0f }
  271. #define FMOD_PRESET_PLAIN { 1500, 179, 100, 5000, 50, 21, 100, 250, 0, 1670, 65, -28.0f }
  272. #define FMOD_PRESET_PARKINGLOT { 1700, 8, 12, 5000, 100, 100, 100, 250, 0, 20000, 56, -19.5f }
  273. #define FMOD_PRESET_SEWERPIPE { 2800, 14, 21, 5000, 14, 80, 60, 250, 0, 3400, 66, 1.2f }
  274. #define FMOD_PRESET_UNDERWATER { 1500, 7, 11, 5000, 10, 100, 100, 250, 0, 500, 92, 7.0f }
  275. #define FMOD_MAX_CHANNEL_WIDTH 32
  276. #define FMOD_MAX_SYSTEMS 8
  277. #define FMOD_MAX_LISTENERS 8
  278. #define FMOD_REVERB_MAXINSTANCES 4
  279. typedef enum FMOD_THREAD_TYPE
  280. {
  281. FMOD_THREAD_TYPE_MIXER,
  282. FMOD_THREAD_TYPE_FEEDER,
  283. FMOD_THREAD_TYPE_STREAM,
  284. FMOD_THREAD_TYPE_FILE,
  285. FMOD_THREAD_TYPE_NONBLOCKING,
  286. FMOD_THREAD_TYPE_RECORD,
  287. FMOD_THREAD_TYPE_GEOMETRY,
  288. FMOD_THREAD_TYPE_PROFILER,
  289. FMOD_THREAD_TYPE_STUDIO_UPDATE,
  290. FMOD_THREAD_TYPE_STUDIO_LOAD_BANK,
  291. FMOD_THREAD_TYPE_STUDIO_LOAD_SAMPLE,
  292. FMOD_THREAD_TYPE_CONVOLUTION1,
  293. FMOD_THREAD_TYPE_CONVOLUTION2,
  294. FMOD_THREAD_TYPE_MAX,
  295. FMOD_THREAD_TYPE_FORCEINT = 65536
  296. } FMOD_THREAD_TYPE;
  297. typedef enum FMOD_RESULT
  298. {
  299. FMOD_OK,
  300. FMOD_ERR_BADCOMMAND,
  301. FMOD_ERR_CHANNEL_ALLOC,
  302. FMOD_ERR_CHANNEL_STOLEN,
  303. FMOD_ERR_DMA,
  304. FMOD_ERR_DSP_CONNECTION,
  305. FMOD_ERR_DSP_DONTPROCESS,
  306. FMOD_ERR_DSP_FORMAT,
  307. FMOD_ERR_DSP_INUSE,
  308. FMOD_ERR_DSP_NOTFOUND,
  309. FMOD_ERR_DSP_RESERVED,
  310. FMOD_ERR_DSP_SILENCE,
  311. FMOD_ERR_DSP_TYPE,
  312. FMOD_ERR_FILE_BAD,
  313. FMOD_ERR_FILE_COULDNOTSEEK,
  314. FMOD_ERR_FILE_DISKEJECTED,
  315. FMOD_ERR_FILE_EOF,
  316. FMOD_ERR_FILE_ENDOFDATA,
  317. FMOD_ERR_FILE_NOTFOUND,
  318. FMOD_ERR_FORMAT,
  319. FMOD_ERR_HEADER_MISMATCH,
  320. FMOD_ERR_HTTP,
  321. FMOD_ERR_HTTP_ACCESS,
  322. FMOD_ERR_HTTP_PROXY_AUTH,
  323. FMOD_ERR_HTTP_SERVER_ERROR,
  324. FMOD_ERR_HTTP_TIMEOUT,
  325. FMOD_ERR_INITIALIZATION,
  326. FMOD_ERR_INITIALIZED,
  327. FMOD_ERR_INTERNAL,
  328. FMOD_ERR_INVALID_FLOAT,
  329. FMOD_ERR_INVALID_HANDLE,
  330. FMOD_ERR_INVALID_PARAM,
  331. FMOD_ERR_INVALID_POSITION,
  332. FMOD_ERR_INVALID_SPEAKER,
  333. FMOD_ERR_INVALID_SYNCPOINT,
  334. FMOD_ERR_INVALID_THREAD,
  335. FMOD_ERR_INVALID_VECTOR,
  336. FMOD_ERR_MAXAUDIBLE,
  337. FMOD_ERR_MEMORY,
  338. FMOD_ERR_MEMORY_CANTPOINT,
  339. FMOD_ERR_NEEDS3D,
  340. FMOD_ERR_NEEDSHARDWARE,
  341. FMOD_ERR_NET_CONNECT,
  342. FMOD_ERR_NET_SOCKET_ERROR,
  343. FMOD_ERR_NET_URL,
  344. FMOD_ERR_NET_WOULD_BLOCK,
  345. FMOD_ERR_NOTREADY,
  346. FMOD_ERR_OUTPUT_ALLOCATED,
  347. FMOD_ERR_OUTPUT_CREATEBUFFER,
  348. FMOD_ERR_OUTPUT_DRIVERCALL,
  349. FMOD_ERR_OUTPUT_FORMAT,
  350. FMOD_ERR_OUTPUT_INIT,
  351. FMOD_ERR_OUTPUT_NODRIVERS,
  352. FMOD_ERR_PLUGIN,
  353. FMOD_ERR_PLUGIN_MISSING,
  354. FMOD_ERR_PLUGIN_RESOURCE,
  355. FMOD_ERR_PLUGIN_VERSION,
  356. FMOD_ERR_RECORD,
  357. FMOD_ERR_REVERB_CHANNELGROUP,
  358. FMOD_ERR_REVERB_INSTANCE,
  359. FMOD_ERR_SUBSOUNDS,
  360. FMOD_ERR_SUBSOUND_ALLOCATED,
  361. FMOD_ERR_SUBSOUND_CANTMOVE,
  362. FMOD_ERR_TAGNOTFOUND,
  363. FMOD_ERR_TOOMANYCHANNELS,
  364. FMOD_ERR_TRUNCATED,
  365. FMOD_ERR_UNIMPLEMENTED,
  366. FMOD_ERR_UNINITIALIZED,
  367. FMOD_ERR_UNSUPPORTED,
  368. FMOD_ERR_VERSION,
  369. FMOD_ERR_EVENT_ALREADY_LOADED,
  370. FMOD_ERR_EVENT_LIVEUPDATE_BUSY,
  371. FMOD_ERR_EVENT_LIVEUPDATE_MISMATCH,
  372. FMOD_ERR_EVENT_LIVEUPDATE_TIMEOUT,
  373. FMOD_ERR_EVENT_NOTFOUND,
  374. FMOD_ERR_STUDIO_UNINITIALIZED,
  375. FMOD_ERR_STUDIO_NOT_LOADED,
  376. FMOD_ERR_INVALID_STRING,
  377. FMOD_ERR_ALREADY_LOCKED,
  378. FMOD_ERR_NOT_LOCKED,
  379. FMOD_ERR_RECORD_DISCONNECTED,
  380. FMOD_ERR_TOOMANYSAMPLES,
  381. FMOD_RESULT_FORCEINT = 65536
  382. } FMOD_RESULT;
  383. typedef enum FMOD_CHANNELCONTROL_TYPE
  384. {
  385. FMOD_CHANNELCONTROL_CHANNEL,
  386. FMOD_CHANNELCONTROL_CHANNELGROUP,
  387. FMOD_CHANNELCONTROL_MAX,
  388. FMOD_CHANNELCONTROL_FORCEINT = 65536
  389. } FMOD_CHANNELCONTROL_TYPE;
  390. typedef enum FMOD_OUTPUTTYPE
  391. {
  392. FMOD_OUTPUTTYPE_AUTODETECT,
  393. FMOD_OUTPUTTYPE_UNKNOWN,
  394. FMOD_OUTPUTTYPE_NOSOUND,
  395. FMOD_OUTPUTTYPE_WAVWRITER,
  396. FMOD_OUTPUTTYPE_NOSOUND_NRT,
  397. FMOD_OUTPUTTYPE_WAVWRITER_NRT,
  398. FMOD_OUTPUTTYPE_WASAPI,
  399. FMOD_OUTPUTTYPE_ASIO,
  400. FMOD_OUTPUTTYPE_PULSEAUDIO,
  401. FMOD_OUTPUTTYPE_ALSA,
  402. FMOD_OUTPUTTYPE_COREAUDIO,
  403. FMOD_OUTPUTTYPE_AUDIOTRACK,
  404. FMOD_OUTPUTTYPE_OPENSL,
  405. FMOD_OUTPUTTYPE_AUDIOOUT,
  406. FMOD_OUTPUTTYPE_AUDIO3D,
  407. FMOD_OUTPUTTYPE_WEBAUDIO,
  408. FMOD_OUTPUTTYPE_NNAUDIO,
  409. FMOD_OUTPUTTYPE_WINSONIC,
  410. FMOD_OUTPUTTYPE_AAUDIO,
  411. FMOD_OUTPUTTYPE_AUDIOWORKLET,
  412. FMOD_OUTPUTTYPE_PHASE,
  413. FMOD_OUTPUTTYPE_OHAUDIO,
  414. FMOD_OUTPUTTYPE_MAX,
  415. FMOD_OUTPUTTYPE_FORCEINT = 65536
  416. } FMOD_OUTPUTTYPE;
  417. typedef enum FMOD_DEBUG_MODE
  418. {
  419. FMOD_DEBUG_MODE_TTY,
  420. FMOD_DEBUG_MODE_FILE,
  421. FMOD_DEBUG_MODE_CALLBACK,
  422. FMOD_DEBUG_MODE_FORCEINT = 65536
  423. } FMOD_DEBUG_MODE;
  424. typedef enum FMOD_SPEAKERMODE
  425. {
  426. FMOD_SPEAKERMODE_DEFAULT,
  427. FMOD_SPEAKERMODE_RAW,
  428. FMOD_SPEAKERMODE_MONO,
  429. FMOD_SPEAKERMODE_STEREO,
  430. FMOD_SPEAKERMODE_QUAD,
  431. FMOD_SPEAKERMODE_SURROUND,
  432. FMOD_SPEAKERMODE_5POINT1,
  433. FMOD_SPEAKERMODE_7POINT1,
  434. FMOD_SPEAKERMODE_7POINT1POINT4,
  435. FMOD_SPEAKERMODE_MAX,
  436. FMOD_SPEAKERMODE_FORCEINT = 65536
  437. } FMOD_SPEAKERMODE;
  438. typedef enum FMOD_SPEAKER
  439. {
  440. FMOD_SPEAKER_NONE = -1,
  441. FMOD_SPEAKER_FRONT_LEFT = 0,
  442. FMOD_SPEAKER_FRONT_RIGHT,
  443. FMOD_SPEAKER_FRONT_CENTER,
  444. FMOD_SPEAKER_LOW_FREQUENCY,
  445. FMOD_SPEAKER_SURROUND_LEFT,
  446. FMOD_SPEAKER_SURROUND_RIGHT,
  447. FMOD_SPEAKER_BACK_LEFT,
  448. FMOD_SPEAKER_BACK_RIGHT,
  449. FMOD_SPEAKER_TOP_FRONT_LEFT,
  450. FMOD_SPEAKER_TOP_FRONT_RIGHT,
  451. FMOD_SPEAKER_TOP_BACK_LEFT,
  452. FMOD_SPEAKER_TOP_BACK_RIGHT,
  453. FMOD_SPEAKER_MAX,
  454. FMOD_SPEAKER_FORCEINT = 65536
  455. } FMOD_SPEAKER;
  456. typedef enum FMOD_CHANNELORDER
  457. {
  458. FMOD_CHANNELORDER_DEFAULT,
  459. FMOD_CHANNELORDER_WAVEFORMAT,
  460. FMOD_CHANNELORDER_PROTOOLS,
  461. FMOD_CHANNELORDER_ALLMONO,
  462. FMOD_CHANNELORDER_ALLSTEREO,
  463. FMOD_CHANNELORDER_ALSA,
  464. FMOD_CHANNELORDER_MAX,
  465. FMOD_CHANNELORDER_FORCEINT = 65536
  466. } FMOD_CHANNELORDER;
  467. typedef enum FMOD_PLUGINTYPE
  468. {
  469. FMOD_PLUGINTYPE_OUTPUT,
  470. FMOD_PLUGINTYPE_CODEC,
  471. FMOD_PLUGINTYPE_DSP,
  472. FMOD_PLUGINTYPE_MAX,
  473. FMOD_PLUGINTYPE_FORCEINT = 65536
  474. } FMOD_PLUGINTYPE;
  475. typedef enum FMOD_SOUND_TYPE
  476. {
  477. FMOD_SOUND_TYPE_UNKNOWN,
  478. FMOD_SOUND_TYPE_AIFF,
  479. FMOD_SOUND_TYPE_ASF,
  480. FMOD_SOUND_TYPE_DLS,
  481. FMOD_SOUND_TYPE_FLAC,
  482. FMOD_SOUND_TYPE_FSB,
  483. FMOD_SOUND_TYPE_IT,
  484. FMOD_SOUND_TYPE_MIDI,
  485. FMOD_SOUND_TYPE_MOD,
  486. FMOD_SOUND_TYPE_MPEG,
  487. FMOD_SOUND_TYPE_OGGVORBIS,
  488. FMOD_SOUND_TYPE_PLAYLIST,
  489. FMOD_SOUND_TYPE_RAW,
  490. FMOD_SOUND_TYPE_S3M,
  491. FMOD_SOUND_TYPE_USER,
  492. FMOD_SOUND_TYPE_WAV,
  493. FMOD_SOUND_TYPE_XM,
  494. FMOD_SOUND_TYPE_XMA,
  495. FMOD_SOUND_TYPE_AUDIOQUEUE,
  496. FMOD_SOUND_TYPE_AT9,
  497. FMOD_SOUND_TYPE_VORBIS,
  498. FMOD_SOUND_TYPE_MEDIA_FOUNDATION,
  499. FMOD_SOUND_TYPE_MEDIACODEC,
  500. FMOD_SOUND_TYPE_FADPCM,
  501. FMOD_SOUND_TYPE_OPUS,
  502. FMOD_SOUND_TYPE_MAX,
  503. FMOD_SOUND_TYPE_FORCEINT = 65536
  504. } FMOD_SOUND_TYPE;
  505. typedef enum FMOD_SOUND_FORMAT
  506. {
  507. FMOD_SOUND_FORMAT_NONE,
  508. FMOD_SOUND_FORMAT_PCM8,
  509. FMOD_SOUND_FORMAT_PCM16,
  510. FMOD_SOUND_FORMAT_PCM24,
  511. FMOD_SOUND_FORMAT_PCM32,
  512. FMOD_SOUND_FORMAT_PCMFLOAT,
  513. FMOD_SOUND_FORMAT_BITSTREAM,
  514. FMOD_SOUND_FORMAT_MAX,
  515. FMOD_SOUND_FORMAT_FORCEINT = 65536
  516. } FMOD_SOUND_FORMAT;
  517. typedef enum FMOD_OPENSTATE
  518. {
  519. FMOD_OPENSTATE_READY,
  520. FMOD_OPENSTATE_LOADING,
  521. FMOD_OPENSTATE_ERROR,
  522. FMOD_OPENSTATE_CONNECTING,
  523. FMOD_OPENSTATE_BUFFERING,
  524. FMOD_OPENSTATE_SEEKING,
  525. FMOD_OPENSTATE_PLAYING,
  526. FMOD_OPENSTATE_SETPOSITION,
  527. FMOD_OPENSTATE_MAX,
  528. FMOD_OPENSTATE_FORCEINT = 65536
  529. } FMOD_OPENSTATE;
  530. typedef enum FMOD_SOUNDGROUP_BEHAVIOR
  531. {
  532. FMOD_SOUNDGROUP_BEHAVIOR_FAIL,
  533. FMOD_SOUNDGROUP_BEHAVIOR_MUTE,
  534. FMOD_SOUNDGROUP_BEHAVIOR_STEALLOWEST,
  535. FMOD_SOUNDGROUP_BEHAVIOR_MAX,
  536. FMOD_SOUNDGROUP_BEHAVIOR_FORCEINT = 65536
  537. } FMOD_SOUNDGROUP_BEHAVIOR;
  538. typedef enum FMOD_CHANNELCONTROL_CALLBACK_TYPE
  539. {
  540. FMOD_CHANNELCONTROL_CALLBACK_END,
  541. FMOD_CHANNELCONTROL_CALLBACK_VIRTUALVOICE,
  542. FMOD_CHANNELCONTROL_CALLBACK_SYNCPOINT,
  543. FMOD_CHANNELCONTROL_CALLBACK_OCCLUSION,
  544. FMOD_CHANNELCONTROL_CALLBACK_MAX,
  545. FMOD_CHANNELCONTROL_CALLBACK_FORCEINT = 65536
  546. } FMOD_CHANNELCONTROL_CALLBACK_TYPE;
  547. typedef enum FMOD_CHANNELCONTROL_DSP_INDEX
  548. {
  549. FMOD_CHANNELCONTROL_DSP_HEAD = -1,
  550. FMOD_CHANNELCONTROL_DSP_FADER = -2,
  551. FMOD_CHANNELCONTROL_DSP_TAIL = -3,
  552. FMOD_CHANNELCONTROL_DSP_FORCEINT = 65536
  553. } FMOD_CHANNELCONTROL_DSP_INDEX;
  554. typedef enum FMOD_ERRORCALLBACK_INSTANCETYPE
  555. {
  556. FMOD_ERRORCALLBACK_INSTANCETYPE_NONE,
  557. FMOD_ERRORCALLBACK_INSTANCETYPE_SYSTEM,
  558. FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNEL,
  559. FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELGROUP,
  560. FMOD_ERRORCALLBACK_INSTANCETYPE_CHANNELCONTROL,
  561. FMOD_ERRORCALLBACK_INSTANCETYPE_SOUND,
  562. FMOD_ERRORCALLBACK_INSTANCETYPE_SOUNDGROUP,
  563. FMOD_ERRORCALLBACK_INSTANCETYPE_DSP,
  564. FMOD_ERRORCALLBACK_INSTANCETYPE_DSPCONNECTION,
  565. FMOD_ERRORCALLBACK_INSTANCETYPE_GEOMETRY,
  566. FMOD_ERRORCALLBACK_INSTANCETYPE_REVERB3D,
  567. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_SYSTEM,
  568. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTDESCRIPTION,
  569. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_EVENTINSTANCE,
  570. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_PARAMETERINSTANCE,
  571. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BUS,
  572. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_VCA,
  573. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_BANK,
  574. FMOD_ERRORCALLBACK_INSTANCETYPE_STUDIO_COMMANDREPLAY,
  575. FMOD_ERRORCALLBACK_INSTANCETYPE_FORCEINT = 65536
  576. } FMOD_ERRORCALLBACK_INSTANCETYPE;
  577. typedef enum FMOD_DSP_RESAMPLER
  578. {
  579. FMOD_DSP_RESAMPLER_DEFAULT,
  580. FMOD_DSP_RESAMPLER_NOINTERP,
  581. FMOD_DSP_RESAMPLER_LINEAR,
  582. FMOD_DSP_RESAMPLER_CUBIC,
  583. FMOD_DSP_RESAMPLER_SPLINE,
  584. FMOD_DSP_RESAMPLER_MAX,
  585. FMOD_DSP_RESAMPLER_FORCEINT = 65536
  586. } FMOD_DSP_RESAMPLER;
  587. typedef enum FMOD_DSP_CALLBACK_TYPE
  588. {
  589. FMOD_DSP_CALLBACK_DATAPARAMETERRELEASE,
  590. FMOD_DSP_CALLBACK_MAX,
  591. FMOD_DSP_CALLBACK_FORCEINT = 65536
  592. } FMOD_DSP_CALLBACK_TYPE;
  593. typedef enum FMOD_DSPCONNECTION_TYPE
  594. {
  595. FMOD_DSPCONNECTION_TYPE_STANDARD,
  596. FMOD_DSPCONNECTION_TYPE_SIDECHAIN,
  597. FMOD_DSPCONNECTION_TYPE_SEND,
  598. FMOD_DSPCONNECTION_TYPE_SEND_SIDECHAIN,
  599. FMOD_DSPCONNECTION_TYPE_MAX,
  600. FMOD_DSPCONNECTION_TYPE_FORCEINT = 65536
  601. } FMOD_DSPCONNECTION_TYPE;
  602. typedef enum FMOD_TAGTYPE
  603. {
  604. FMOD_TAGTYPE_UNKNOWN,
  605. FMOD_TAGTYPE_ID3V1,
  606. FMOD_TAGTYPE_ID3V2,
  607. FMOD_TAGTYPE_VORBISCOMMENT,
  608. FMOD_TAGTYPE_SHOUTCAST,
  609. FMOD_TAGTYPE_ICECAST,
  610. FMOD_TAGTYPE_ASF,
  611. FMOD_TAGTYPE_MIDI,
  612. FMOD_TAGTYPE_PLAYLIST,
  613. FMOD_TAGTYPE_FMOD,
  614. FMOD_TAGTYPE_USER,
  615. FMOD_TAGTYPE_MAX,
  616. FMOD_TAGTYPE_FORCEINT = 65536
  617. } FMOD_TAGTYPE;
  618. typedef enum FMOD_TAGDATATYPE
  619. {
  620. FMOD_TAGDATATYPE_BINARY,
  621. FMOD_TAGDATATYPE_INT,
  622. FMOD_TAGDATATYPE_FLOAT,
  623. FMOD_TAGDATATYPE_STRING,
  624. FMOD_TAGDATATYPE_STRING_UTF16,
  625. FMOD_TAGDATATYPE_STRING_UTF16BE,
  626. FMOD_TAGDATATYPE_STRING_UTF8,
  627. FMOD_TAGDATATYPE_MAX,
  628. FMOD_TAGDATATYPE_FORCEINT = 65536
  629. } FMOD_TAGDATATYPE;
  630. typedef enum FMOD_PORT_TYPE
  631. {
  632. FMOD_PORT_TYPE_MUSIC,
  633. FMOD_PORT_TYPE_COPYRIGHT_MUSIC,
  634. FMOD_PORT_TYPE_VOICE,
  635. FMOD_PORT_TYPE_CONTROLLER,
  636. FMOD_PORT_TYPE_PERSONAL,
  637. FMOD_PORT_TYPE_VIBRATION,
  638. FMOD_PORT_TYPE_AUX,
  639. FMOD_PORT_TYPE_PASSTHROUGH,
  640. FMOD_PORT_TYPE_VR_VIBRATION,
  641. FMOD_PORT_TYPE_MAX,
  642. FMOD_PORT_TYPE_FORCEINT = 65536
  643. } FMOD_PORT_TYPE;
  644. /*
  645. FMOD callbacks
  646. */
  647. typedef FMOD_RESULT (F_CALL *FMOD_DEBUG_CALLBACK) (FMOD_DEBUG_FLAGS flags, const char *file, int line, const char* func, const char* message);
  648. typedef FMOD_RESULT (F_CALL *FMOD_SYSTEM_CALLBACK) (FMOD_SYSTEM *system, FMOD_SYSTEM_CALLBACK_TYPE type, void *commanddata1, void* commanddata2, void *userdata);
  649. typedef FMOD_RESULT (F_CALL *FMOD_CHANNELCONTROL_CALLBACK) (FMOD_CHANNELCONTROL *channelcontrol, FMOD_CHANNELCONTROL_TYPE controltype, FMOD_CHANNELCONTROL_CALLBACK_TYPE callbacktype, void *commanddata1, void *commanddata2);
  650. typedef FMOD_RESULT (F_CALL *FMOD_DSP_CALLBACK) (FMOD_DSP *dsp, FMOD_DSP_CALLBACK_TYPE type, void *data);
  651. typedef FMOD_RESULT (F_CALL *FMOD_SOUND_NONBLOCK_CALLBACK) (FMOD_SOUND *sound, FMOD_RESULT result);
  652. typedef FMOD_RESULT (F_CALL *FMOD_SOUND_PCMREAD_CALLBACK) (FMOD_SOUND *sound, void *data, unsigned int datalen);
  653. typedef FMOD_RESULT (F_CALL *FMOD_SOUND_PCMSETPOS_CALLBACK) (FMOD_SOUND *sound, int subsound, unsigned int position, FMOD_TIMEUNIT postype);
  654. typedef FMOD_RESULT (F_CALL *FMOD_FILE_OPEN_CALLBACK) (const char *name, unsigned int *filesize, void **handle, void *userdata);
  655. typedef FMOD_RESULT (F_CALL *FMOD_FILE_CLOSE_CALLBACK) (void *handle, void *userdata);
  656. typedef FMOD_RESULT (F_CALL *FMOD_FILE_READ_CALLBACK) (void *handle, void *buffer, unsigned int sizebytes, unsigned int *bytesread, void *userdata);
  657. typedef FMOD_RESULT (F_CALL *FMOD_FILE_SEEK_CALLBACK) (void *handle, unsigned int pos, void *userdata);
  658. typedef FMOD_RESULT (F_CALL *FMOD_FILE_ASYNCREAD_CALLBACK) (FMOD_ASYNCREADINFO *info, void *userdata);
  659. typedef FMOD_RESULT (F_CALL *FMOD_FILE_ASYNCCANCEL_CALLBACK)(FMOD_ASYNCREADINFO *info, void *userdata);
  660. typedef void (F_CALL *FMOD_FILE_ASYNCDONE_FUNC) (FMOD_ASYNCREADINFO *info, FMOD_RESULT result);
  661. typedef void* (F_CALL *FMOD_MEMORY_ALLOC_CALLBACK) (unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
  662. typedef void* (F_CALL *FMOD_MEMORY_REALLOC_CALLBACK) (void *ptr, unsigned int size, FMOD_MEMORY_TYPE type, const char *sourcestr);
  663. typedef void (F_CALL *FMOD_MEMORY_FREE_CALLBACK) (void *ptr, FMOD_MEMORY_TYPE type, const char *sourcestr);
  664. typedef float (F_CALL *FMOD_3D_ROLLOFF_CALLBACK) (FMOD_CHANNELCONTROL *channelcontrol, float distance);
  665. /*
  666. FMOD structs
  667. */
  668. struct FMOD_ASYNCREADINFO
  669. {
  670. void *handle;
  671. unsigned int offset;
  672. unsigned int sizebytes;
  673. int priority;
  674. void *userdata;
  675. void *buffer;
  676. unsigned int bytesread;
  677. FMOD_FILE_ASYNCDONE_FUNC done;
  678. };
  679. typedef struct FMOD_VECTOR
  680. {
  681. float x;
  682. float y;
  683. float z;
  684. } FMOD_VECTOR;
  685. typedef struct FMOD_3D_ATTRIBUTES
  686. {
  687. FMOD_VECTOR position;
  688. FMOD_VECTOR velocity;
  689. FMOD_VECTOR forward;
  690. FMOD_VECTOR up;
  691. } FMOD_3D_ATTRIBUTES;
  692. typedef struct FMOD_GUID
  693. {
  694. unsigned int Data1;
  695. unsigned short Data2;
  696. unsigned short Data3;
  697. unsigned char Data4[8];
  698. } FMOD_GUID;
  699. typedef struct FMOD_PLUGINLIST
  700. {
  701. FMOD_PLUGINTYPE type;
  702. void *description;
  703. } FMOD_PLUGINLIST;
  704. typedef struct FMOD_ADVANCEDSETTINGS
  705. {
  706. int cbSize;
  707. int maxMPEGCodecs;
  708. int maxADPCMCodecs;
  709. int maxXMACodecs;
  710. int maxVorbisCodecs;
  711. int maxAT9Codecs;
  712. int maxFADPCMCodecs;
  713. int maxOpusCodecs;
  714. int ASIONumChannels;
  715. char **ASIOChannelList;
  716. FMOD_SPEAKER *ASIOSpeakerList;
  717. float vol0virtualvol;
  718. unsigned int defaultDecodeBufferSize;
  719. unsigned short profilePort;
  720. unsigned int geometryMaxFadeTime;
  721. float distanceFilterCenterFreq;
  722. int reverb3Dinstance;
  723. int DSPBufferPoolSize;
  724. FMOD_DSP_RESAMPLER resamplerMethod;
  725. unsigned int randomSeed;
  726. int maxConvolutionThreads;
  727. int maxSpatialObjects;
  728. } FMOD_ADVANCEDSETTINGS;
  729. typedef struct FMOD_TAG
  730. {
  731. FMOD_TAGTYPE type;
  732. FMOD_TAGDATATYPE datatype;
  733. char *name;
  734. void *data;
  735. unsigned int datalen;
  736. FMOD_BOOL updated;
  737. } FMOD_TAG;
  738. typedef struct FMOD_CREATESOUNDEXINFO
  739. {
  740. int cbsize;
  741. unsigned int length;
  742. unsigned int fileoffset;
  743. int numchannels;
  744. int defaultfrequency;
  745. FMOD_SOUND_FORMAT format;
  746. unsigned int decodebuffersize;
  747. int initialsubsound;
  748. int numsubsounds;
  749. int *inclusionlist;
  750. int inclusionlistnum;
  751. FMOD_SOUND_PCMREAD_CALLBACK pcmreadcallback;
  752. FMOD_SOUND_PCMSETPOS_CALLBACK pcmsetposcallback;
  753. FMOD_SOUND_NONBLOCK_CALLBACK nonblockcallback;
  754. const char *dlsname;
  755. const char *encryptionkey;
  756. int maxpolyphony;
  757. void *userdata;
  758. FMOD_SOUND_TYPE suggestedsoundtype;
  759. FMOD_FILE_OPEN_CALLBACK fileuseropen;
  760. FMOD_FILE_CLOSE_CALLBACK fileuserclose;
  761. FMOD_FILE_READ_CALLBACK fileuserread;
  762. FMOD_FILE_SEEK_CALLBACK fileuserseek;
  763. FMOD_FILE_ASYNCREAD_CALLBACK fileuserasyncread;
  764. FMOD_FILE_ASYNCCANCEL_CALLBACK fileuserasynccancel;
  765. void *fileuserdata;
  766. int filebuffersize;
  767. FMOD_CHANNELORDER channelorder;
  768. FMOD_SOUNDGROUP *initialsoundgroup;
  769. unsigned int initialseekposition;
  770. FMOD_TIMEUNIT initialseekpostype;
  771. int ignoresetfilesystem;
  772. unsigned int audioqueuepolicy;
  773. unsigned int minmidigranularity;
  774. int nonblockthreadid;
  775. FMOD_GUID *fsbguid;
  776. } FMOD_CREATESOUNDEXINFO;
  777. typedef struct FMOD_REVERB_PROPERTIES
  778. {
  779. float DecayTime;
  780. float EarlyDelay;
  781. float LateDelay;
  782. float HFReference;
  783. float HFDecayRatio;
  784. float Diffusion;
  785. float Density;
  786. float LowShelfFrequency;
  787. float LowShelfGain;
  788. float HighCut;
  789. float EarlyLateMix;
  790. float WetLevel;
  791. } FMOD_REVERB_PROPERTIES;
  792. typedef struct FMOD_ERRORCALLBACK_INFO
  793. {
  794. FMOD_RESULT result;
  795. FMOD_ERRORCALLBACK_INSTANCETYPE instancetype;
  796. void *instance;
  797. const char *functionname;
  798. const char *functionparams;
  799. } FMOD_ERRORCALLBACK_INFO;
  800. typedef struct FMOD_CPU_USAGE
  801. {
  802. float dsp;
  803. float stream;
  804. float geometry;
  805. float update;
  806. float convolution1;
  807. float convolution2;
  808. } FMOD_CPU_USAGE;
  809. typedef struct FMOD_DSP_DATA_PARAMETER_INFO
  810. {
  811. void *data;
  812. unsigned int length;
  813. int index;
  814. } FMOD_DSP_DATA_PARAMETER_INFO;
  815. /*
  816. FMOD optional headers for plugin development
  817. */
  818. #include "fmod_codec.h"
  819. #include "fmod_dsp.h"
  820. #include "fmod_output.h"
  821. #endif