PluginDef.h 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986
  1. /*******************************************************************************
  2. The content of this file includes portions of the AUDIOKINETIC Wwise Technology
  3. released in source code form as part of the SDK installer package.
  4. Commercial License Usage
  5. Licensees holding valid commercial licenses to the AUDIOKINETIC Wwise Technology
  6. may use this file in accordance with the end user license agreement provided
  7. with the software or, alternatively, in accordance with the terms contained in a
  8. written agreement between you and Audiokinetic Inc.
  9. Apache License Usage
  10. Alternatively, this file may be used under the Apache License, Version 2.0 (the
  11. "Apache License"); you may not use this file except in compliance with the
  12. Apache License. You may obtain a copy of the Apache License at
  13. http://www.apache.org/licenses/LICENSE-2.0.
  14. Unless required by applicable law or agreed to in writing, software distributed
  15. under the Apache License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES
  16. OR CONDITIONS OF ANY KIND, either express or implied. See the Apache License for
  17. the specific language governing permissions and limitations under the License.
  18. Copyright (c) 2023 Audiokinetic Inc.
  19. *******************************************************************************/
  20. /**
  21. * \brief Wwise Authoring Plug-ins - Base plug-in definitions
  22. * \file AK/Wwise/Plugin/PluginDef.h
  23. */
  24. #pragma once
  25. #include "PluginHelpers.h"
  26. // Everthing in this section needs:
  27. // - to be converted back to plain vanilla C
  28. // - create optional interfaces for classes
  29. // - create compulsory convertion functions for enums
  30. #ifdef __cplusplus
  31. #include "../../SoundEngine/Common/IAkPlugin.h"
  32. namespace AK
  33. {
  34. namespace WwiseAuthoringAPI
  35. {
  36. class AkVariantBase;
  37. }
  38. }
  39. namespace AK
  40. {
  41. namespace Wwise
  42. {
  43. namespace Plugin
  44. {
  45. /// License type.
  46. enum LicenseType
  47. {
  48. LicenseType_Trial = 1, ///< Used for both Trial and Evaluation License handling
  49. LicenseType_Purchased, ///< The license was purchased
  50. LicenseType_Academic ///< The license is for academic
  51. };
  52. /// License status.
  53. enum LicenseStatus
  54. {
  55. LicenseStatus_Unlicensed, ///< No license found
  56. LicenseStatus_Expired, ///< A license is found, but is expired
  57. LicenseStatus_Valid, ///< A license is found and is valid
  58. LicenseStatus_Incompatible ///< The plugin was made for an older version of Wwise
  59. };
  60. /// Type of operation for the NotifyInnerObjectAddedRemoved function.
  61. enum NotifyInnerObjectOperation
  62. {
  63. InnerObjectAdded,
  64. InnerObjectRemoved
  65. };
  66. struct MonitorData
  67. {
  68. uint64_t uGameObjectID;
  69. void* pData;
  70. unsigned int uDataSize;
  71. };
  72. /// Import channel configuration options.
  73. enum AudioFileChannel
  74. {
  75. Channel_mono = 0,
  76. Channel_stereo = 1,
  77. Channel_mono_drop = 2,
  78. Channel_stereo_drop = 3,
  79. Channel_as_input = 4,
  80. Channel_mono_drop_right = 5,
  81. Channel_stereo_balance = 6,
  82. };
  83. /// Log message severity.
  84. enum Severity
  85. {
  86. Severity_Success = -1, ///< operation was executed without errors or will not produce errors
  87. Severity_Message, ///< not impacting the integrity of the current operation
  88. Severity_Warning, ///< potentially impacting the integrity of the current operation
  89. Severity_Error, ///< impacting the integrity of the current operation
  90. Severity_FatalError, ///< impacting the completion of the current operation
  91. };
  92. /// Represents the association between a dialog control (such as
  93. /// a checkbox or radio button) and a plug-in property.
  94. /// \aknote
  95. /// You should not need to use this structure directly. Instead, use the
  96. /// AK_BEGIN_POPULATE_TABLE(), AK_POP_ITEM(), and AK_END_POPULATE_TABLE() macros.
  97. /// \endaknote
  98. /// \sa
  99. /// - \ref wwiseplugin_dialog_guide_poptable
  100. struct PopulateTableItem
  101. {
  102. uint32_t uiID; ///< The dialog control resource ID
  103. const char * pszProp; ///< The property name
  104. };
  105. /// Dialog type. Source plug-ins can be edited in the Property Editor or
  106. /// the Contents Editor, while effect plug-ins can only be edited in the
  107. /// Effect Editor.
  108. /// \sa
  109. /// - \ref wwiseplugin_dialogcode
  110. enum eDialog
  111. {
  112. SettingsDialog, ///< Main plug-in dialog. This is the dialog used in the Property
  113. ///< Editor for source plug-ins, and in the Effect Editor for
  114. ///< effect plug-ins.
  115. ContentsEditorDialog ///< Contents Editor dialog. This is the small dialog used in the
  116. ///< Contents Editor for source plug-ins.
  117. };
  118. /// Conversion error code.
  119. enum ConversionResult
  120. {
  121. ConversionSuccess = 0,
  122. ConversionWarning = 1,
  123. ConversionFailed = 2,
  124. };
  125. class IProgress
  126. {
  127. public:
  128. /// Call this to set the name of the operation currently done.
  129. /// If not called the operation will have an empty name in the UI.
  130. /// The name should be on a single line.
  131. virtual void SetCurrentOperationName(const char * in_szOperationName) = 0;
  132. /// Should be called at the beginning of the operation to set the min and max value
  133. virtual void SetRange(uint32_t in_dwMinValue, uint32_t in_dwMaxValue) = 0;
  134. /// Notify of the advancement of the task.
  135. virtual void NotifyProgress(uint32_t in_dwProgress) = 0;
  136. /// Check if the user has cancelled the task
  137. virtual bool IsCancelled() const = 0;
  138. /// Display an error message to the user.
  139. /// The message should be on a single line.
  140. virtual void ErrorMessage(const char * in_rErrorText, Severity in_eSeverity = Severity_Warning) = 0;
  141. };
  142. /// Interface to let the plug in give us a string of any size.
  143. /// The pointer to the interface should not be kept.
  144. class IWriteString
  145. {
  146. public:
  147. virtual void WriteString(const char * in_szString,
  148. int in_iStringLength) = 0;
  149. };
  150. /// Interfaces used to set and get the properties from a plug in.
  151. class IReadOnlyProperties
  152. {
  153. public:
  154. virtual bool GetValue(const char * in_szPropertyName,
  155. AK::WwiseAuthoringAPI::AkVariantBase& out_rValue) const = 0;
  156. virtual int GetType(
  157. const char* in_pszPropertyName ///< The name of the property
  158. ) const = 0;
  159. virtual bool GetValueString(
  160. const char * in_pszPropertyName, ///< The name of the property
  161. const char*& out_varProperty ///< The returned value of the property
  162. ) const = 0;
  163. virtual bool GetValueInt64(
  164. const char * in_pszPropertyName, ///< The name of the property
  165. int64_t& out_varProperty ///< The returned value of the property
  166. ) const = 0;
  167. virtual bool GetValueInt32(
  168. const char * in_pszPropertyName, ///< The name of the property
  169. int32_t& out_varProperty ///< The returned value of the property
  170. ) const = 0;
  171. virtual bool GetValueInt16(
  172. const char * in_pszPropertyName, ///< The name of the property
  173. int16_t& out_varProperty ///< The returned value of the property
  174. ) const = 0;
  175. virtual bool GetValueInt8(
  176. const char * in_pszPropertyName, ///< The name of the property
  177. int8_t& out_varProperty ///< The returned value of the property
  178. ) const = 0;
  179. virtual bool GetValueUInt64(
  180. const char * in_pszPropertyName, ///< The name of the property
  181. uint64_t& out_varProperty ///< The returned value of the property
  182. ) const = 0;
  183. virtual bool GetValueUInt32(
  184. const char * in_pszPropertyName, ///< The name of the property
  185. uint32_t& out_varProperty ///< The returned value of the property
  186. ) const = 0;
  187. virtual bool GetValueUInt16(
  188. const char * in_pszPropertyName, ///< The name of the property
  189. uint16_t& out_varProperty ///< The returned value of the property
  190. ) const = 0;
  191. virtual bool GetValueUInt8(
  192. const char * in_pszPropertyName, ///< The name of the property
  193. uint8_t& out_varProperty ///< The returned value of the property
  194. ) const = 0;
  195. virtual bool GetValueReal64(
  196. const char * in_pszPropertyName, ///< The name of the property
  197. double& out_varProperty ///< The returned value of the property
  198. ) const = 0;
  199. virtual bool GetValueReal32(
  200. const char * in_pszPropertyName, ///< The name of the property
  201. float& out_varProperty ///< The returned value of the property
  202. ) const = 0;
  203. virtual bool GetValueBool(
  204. const char * in_pszPropertyName, ///< The name of the property
  205. bool& out_varProperty ///< The returned value of the property
  206. ) const = 0;
  207. inline const char* GetString(
  208. const char * in_pszPropertyName ///< The name of the property
  209. ) const
  210. {
  211. const char* result;
  212. AKVERIFY(GetValueString(in_pszPropertyName, result));
  213. return result;
  214. }
  215. inline int64_t GetInt64(
  216. const char * in_pszPropertyName ///< The name of the property
  217. ) const
  218. {
  219. int64_t result;
  220. AKVERIFY(GetValueInt64(in_pszPropertyName, result));
  221. return result;
  222. }
  223. inline int32_t GetInt32(
  224. const char * in_pszPropertyName ///< The name of the property
  225. ) const
  226. {
  227. int32_t result;
  228. AKVERIFY(GetValueInt32(in_pszPropertyName, result));
  229. return result;
  230. }
  231. inline int16_t GetInt16(
  232. const char * in_pszPropertyName ///< The name of the property
  233. ) const
  234. {
  235. int16_t result;
  236. AKVERIFY(GetValueInt16(in_pszPropertyName, result));
  237. return result;
  238. }
  239. inline int8_t GetInt8(
  240. const char * in_pszPropertyName ///< The name of the property
  241. ) const
  242. {
  243. int8_t result;
  244. AKVERIFY(GetValueInt8(in_pszPropertyName, result));
  245. return result;
  246. }
  247. inline uint64_t GetUInt64(
  248. const char * in_pszPropertyName ///< The name of the property
  249. ) const
  250. {
  251. uint64_t result;
  252. AKVERIFY(GetValueUInt64(in_pszPropertyName, result));
  253. return result;
  254. }
  255. inline uint32_t GetUInt32(
  256. const char * in_pszPropertyName ///< The name of the property
  257. ) const
  258. {
  259. uint32_t result;
  260. AKVERIFY(GetValueUInt32(in_pszPropertyName, result));
  261. return result;
  262. }
  263. inline uint16_t GetUInt16(
  264. const char * in_pszPropertyName ///< The name of the property
  265. ) const
  266. {
  267. uint16_t result;
  268. AKVERIFY(GetValueUInt16(in_pszPropertyName, result));
  269. return result;
  270. }
  271. inline uint8_t GetUInt8(
  272. const char * in_pszPropertyName ///< The name of the property
  273. ) const
  274. {
  275. uint8_t result;
  276. AKVERIFY(GetValueUInt8(in_pszPropertyName, result));
  277. return result;
  278. }
  279. inline double GetReal64(
  280. const char * in_pszPropertyName ///< The name of the property
  281. ) const
  282. {
  283. double result;
  284. AKVERIFY(GetValueReal64(in_pszPropertyName, result));
  285. return result;
  286. }
  287. inline float GetReal32(
  288. const char * in_pszPropertyName ///< The name of the property
  289. ) const
  290. {
  291. float result;
  292. AKVERIFY(GetValueReal32(in_pszPropertyName, result));
  293. return result;
  294. }
  295. inline bool GetBool(
  296. const char * in_pszPropertyName ///< The name of the property
  297. ) const
  298. {
  299. bool result;
  300. AKVERIFY(GetValueBool(in_pszPropertyName, result));
  301. return result;
  302. }
  303. };
  304. class IReadWriteProperties : public IReadOnlyProperties
  305. {
  306. public:
  307. virtual bool SetValue(const char * in_szPropertyName,
  308. const AK::WwiseAuthoringAPI::AkVariantBase& in_rValue) = 0;
  309. virtual bool ClearValue(
  310. const char* in_pszPropertyName ///< The name of the property
  311. ) = 0;
  312. virtual bool SetValueString(
  313. const char * in_pszPropertyName, ///< The name of the property
  314. const char * in_varProperty ///< The value to set
  315. ) = 0;
  316. virtual bool SetValueInt64(
  317. const char * in_pszPropertyName, ///< The name of the property
  318. int64_t in_varProperty ///< The value to set
  319. ) = 0;
  320. virtual bool SetValueInt32(
  321. const char * in_pszPropertyName, ///< The name of the property
  322. int32_t in_varProperty ///< The value to set
  323. ) = 0;
  324. virtual bool SetValueInt16(
  325. const char * in_pszPropertyName, ///< The name of the property
  326. int16_t in_varProperty ///< The value to set
  327. ) = 0;
  328. virtual bool SetValueInt8(
  329. const char * in_pszPropertyName, ///< The name of the property
  330. int8_t in_varProperty ///< The value to set
  331. ) = 0;
  332. virtual bool SetValueUInt64(
  333. const char * in_pszPropertyName, ///< The name of the property
  334. uint64_t in_varProperty ///< The value to set
  335. ) = 0;
  336. virtual bool SetValueUInt32(
  337. const char * in_pszPropertyName, ///< The name of the property
  338. uint32_t in_varProperty ///< The value to set
  339. ) = 0;
  340. virtual bool SetValueUInt16(
  341. const char * in_pszPropertyName, ///< The name of the property
  342. uint16_t in_varProperty ///< The value to set
  343. ) = 0;
  344. virtual bool SetValueUInt8(
  345. const char * in_pszPropertyName, ///< The name of the property
  346. uint8_t in_varProperty ///< The value to set
  347. ) = 0;
  348. virtual bool SetValueReal64(
  349. const char * in_pszPropertyName, ///< The name of the property
  350. double in_varProperty ///< The value to set
  351. ) = 0;
  352. virtual bool SetValueReal32(
  353. const char * in_pszPropertyName, ///< The name of the property
  354. float in_varProperty ///< The value to set
  355. ) = 0;
  356. virtual bool SetValueBool(
  357. const char * in_pszPropertyName, ///< The name of the property
  358. bool in_varProperty ///< The value to set
  359. ) = 0;
  360. };
  361. // Note: This should be kept in line with RIFFHEADER
  362. struct RiffHeader
  363. {
  364. uint32_t fccChunkId;
  365. uint32_t dwDataSize;
  366. };
  367. struct ConversionContext
  368. {
  369. //
  370. // Inputs
  371. //
  372. const GUID* platformID;
  373. const GUID* basePlatformID;
  374. const char* sourceFileName;
  375. const char* destinationFileName;
  376. AK::Wwise::Plugin::IProgress* progress;
  377. AK::Wwise::Plugin::IWriteString* error;
  378. bool noDecode;
  379. const IReadOnlyProperties* sourceProperties;
  380. IReadWriteProperties* pluginProperties;
  381. // Analysis data types available for this source.
  382. uint32_t analysisDataTypes;
  383. // False if source context contains at least one value that is not the default.
  384. bool isDefault;
  385. // Required downmix normalization gain (linear), 1 if not available / desired.
  386. float downmixNormalizationGain;
  387. //
  388. // Outputs
  389. //
  390. uint32_t sampleRate; ///< Number of samples per second
  391. AkChannelConfig channelConfig; ///< Channel configuration
  392. uint32_t decodedFileSize; ///< File size of file when decoded to PCM format, *If* offline decoding is supported by the codec. Otherwise has value NO_OFFLINE_DECODING (-1)
  393. };
  394. struct OpenedConvertedFile
  395. {
  396. const void* data;
  397. uint32_t dataSize;
  398. uint32_t duration; ///< Actual duration of data, or -1 for entire file.
  399. };
  400. }
  401. }
  402. }
  403. #endif
  404. /** \addtogroup global
  405. * @{
  406. */
  407. struct ak_wwise_plugin_base_interface;
  408. typedef struct ak_wwise_plugin_base_interface* ak_wwise_plugin_interface_ptr; ///< Pointer to a generic base from a plug-in interface.
  409. /**
  410. * \brief Generic base for all plug-in instances. In C++, this is derived. In C, they are equivalent.
  411. *
  412. * \sa
  413. * - \ref ak_wwise_plugin_cpp_base_instance for disrepancies between the C and C++ model.
  414. */
  415. struct ak_wwise_plugin_base_instance {};
  416. typedef struct ak_wwise_plugin_base_instance* ak_wwise_plugin_instance_ptr; ///< Pointer to a generic base for a plug-in instances.
  417. struct ak_wwise_plugin_interface_array_item;
  418. struct ak_wwise_plugin_info;
  419. struct ak_wwise_plugin_container;
  420. typedef void ak_wwise_plugin_widget;
  421. #ifdef __cplusplus
  422. /**
  423. * \brief Generic base for all plug-in instances in C++
  424. *
  425. * \warning This differs from the ak_wwise_plugin_base_instance, as C++ classes have a virtual table as their first member.
  426. * It's important to make the distinction between the two by specifically doing a static_cast between the C version and the C++ version,
  427. * and not a mere reinterpret_cast or a C-style cast. As such, it is expected to instantiate a plug-in in C++, and return
  428. * C pointers back to the instance structures with a different base address.
  429. */
  430. struct ak_wwise_plugin_cpp_base_instance : public ak_wwise_plugin_base_instance
  431. {
  432. virtual ~ak_wwise_plugin_cpp_base_instance() {}
  433. };
  434. /**
  435. * \brief Define a generic instance base, either in C or in C++.
  436. *
  437. * \warning These are NOT equivalent! In C, it is expected you can directly cast from your instance to an
  438. * ak_wwise_plugin_base_instance. In C++, since the base classes have a virtual table, the pointer to the C members is
  439. * shifted in memory.
  440. */
  441. #define AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE : public ak_wwise_plugin_cpp_base_instance
  442. #else
  443. #define AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE
  444. #endif
  445. /**
  446. * \brief Plug-in backend instance.
  447. *
  448. * A backend contains all the logic for the Authoring part of the plug-in. It is uniquely instantiated for each plug-in instance
  449. * in a project.
  450. */
  451. struct ak_wwise_plugin_backend_instance AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  452. /**
  453. * \brief Plug-in frontend instance.
  454. *
  455. * A frontend contains the visual part of the Authoring plug-in. It is optional, for example, it is never instantiated when
  456. * connecting through WwiseConsole. As such, there should never be any processing or "intelligence" done in a frontend part.
  457. *
  458. * For example, the frontend should not affect licensing, soundbank generation, audio processing, property handling (such as
  459. * validating ranges for property sets), media handling, media conversion, custom data loading, ...
  460. *
  461. * \aknote Porting note: In legacy plug-ins, there is only one instance of the Authoring plug-in that contains both
  462. * the backend and the frontend. This has changed for multiple reasons: to be able to instantiate a plug-in backend without any
  463. * frontend, or alternatively, to instantiate multiple copies of a frontend for a unique backend. \endaknote
  464. */
  465. struct ak_wwise_plugin_frontend_instance AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  466. #ifdef __cplusplus
  467. /**
  468. * \brief Define an instance type as a backend.
  469. *
  470. * In C++, this derives the backend instance from the ak_wwise_plugin_backend_instance in a separate action so that RTTI can help
  471. * pinpoint the types and the compiler ensures the type correctness.
  472. *
  473. * In C, this is a typedef, as we cannot derive. The compiler also doesn't need to lookup addresses for complex structures, so this
  474. * is merely an equivalency.
  475. *
  476. * \sa
  477. * - \ref ak_wwise_plugin_backend_instance for a backend discussion.
  478. * - \ref ak_wwise_plugin_frontend_instance for a frontend discussion.
  479. * - \ref ak_wwise_plugin_cpp_base_instance for disrepancies between the C and C++ model.
  480. */
  481. #define AK_WWISE_PLUGIN_DERIVE_FROM_BACKEND_INSTANCE(x) \
  482. struct x : public ak_wwise_plugin_backend_instance {}
  483. /**
  484. * \brief Define an instance type as a frontend.
  485. *
  486. * In C++, this derives the frontend instance from the ak_wwise_plugin_frontend_instance in a separate action so that RTTI can help
  487. * pinpoint the types and the compiler ensures the type correctness.
  488. *
  489. * In C, this is a typedef, as we cannot derive. The compiler also doesn't need to lookup addresses for complex structures, so this
  490. * is merely an equivalency.
  491. *
  492. * \sa
  493. * - \ref ak_wwise_plugin_backend_instance for a backend discussion.
  494. * - \ref ak_wwise_plugin_frontend_instance for a frontend discussion.
  495. * - \ref ak_wwise_plugin_cpp_base_instance for disrepancies between the C and C++ model.
  496. */
  497. #define AK_WWISE_PLUGIN_DERIVE_FROM_FRONTEND_INSTANCE(x) \
  498. struct x : public ak_wwise_plugin_frontend_instance {}
  499. #else
  500. #define AK_WWISE_PLUGIN_DERIVE_FROM_BACKEND_INSTANCE(x) \
  501. typedef x ak_wwise_plugin_backend_instance
  502. #define AK_WWISE_PLUGIN_DERIVE_FROM_FRONTEND_INSTANCE(x) \
  503. typedef x ak_wwise_plugin_frontend_instance
  504. #endif
  505. /**
  506. * \brief Base host-provided instance type for ak_wwise_plugin_host_v1.
  507. *
  508. * \sa
  509. * - ak_wwise_plugin_host_v1 C interface.
  510. * - AK::Wwise::Plugin::V1::Host C++ class.
  511. */
  512. struct ak_wwise_plugin_host_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  513. /**
  514. * \brief Base host-provided instance type for ak_wwise_plugin_host_conversion_helpers_v1.
  515. *
  516. * \sa
  517. * - ak_wwise_plugin_host_conversion_helpers_v1 C interface.
  518. * - AK::Wwise::Plugin::V1::ConversionHelpers C++ class.
  519. */
  520. struct ak_wwise_plugin_host_conversion_helpers_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  521. /**
  522. * \brief Base host-provided instance type for ak_wwise_plugin_host_data_writer_v1.
  523. *
  524. * \sa
  525. * - ak_wwise_plugin_host_data_writer_v1 C interface.
  526. * - AK::Wwise::Plugin::V1::DataWriter C++ class.
  527. */
  528. struct ak_wwise_plugin_host_data_writer_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  529. /**
  530. * \brief Base host-provided instance type for ak_wwise_plugin_host_object_media_v1.
  531. *
  532. * \sa
  533. * - ak_wwise_plugin_host_object_media_v1 C interface.
  534. * - AK::Wwise::Plugin::V1::ObjectMedia C++ class.
  535. */
  536. struct ak_wwise_plugin_host_object_media_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  537. /**
  538. * \brief Base host-provided instance type for ak_wwise_plugin_host_object_store_v1.
  539. *
  540. * \sa
  541. * - ak_wwise_plugin_host_object_store_v1 C interface.
  542. * - AK::Wwise::Plugin::V1::ObjectStore C++ class.
  543. */
  544. struct ak_wwise_plugin_host_object_store_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  545. /**
  546. * \brief Base host-provided instance type for ak_wwise_plugin_host_property_set_v1.
  547. *
  548. * \sa
  549. * - ak_wwise_plugin_host_property_set_v1 C interface.
  550. * - AK::Wwise::Plugin::V1::PropertySet C++ class.
  551. */
  552. struct ak_wwise_plugin_host_property_set_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  553. /**
  554. * \brief Base host-provided instance type for ak_wwise_plugin_host_undo_manager_v1.
  555. *
  556. * \sa
  557. * - ak_wwise_plugin_host_undo_manager_v1 C interface.
  558. * - AK::Wwise::Plugin::V1::UndoManager C++ class.
  559. */
  560. struct ak_wwise_plugin_host_undo_manager_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  561. /**
  562. * \brief Base host-provided instance type for reading XML files through ak_wwise_plugin_host_xml_v1.
  563. *
  564. * \sa
  565. * - ak_wwise_plugin_host_xml_v1 C interface.
  566. * - AK::Wwise::Plugin::V1::XmlReader C++ class.
  567. */
  568. struct ak_wwise_plugin_host_xml_reader_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  569. /**
  570. * \brief Base host-provided instance type for writing XML files through ak_wwise_plugin_host_xml_v1.
  571. *
  572. * \sa
  573. * - ak_wwise_plugin_host_xml_v1 C interface.
  574. * - AK::Wwise::Plugin::V1::XmlWriter C++ class.
  575. */
  576. struct ak_wwise_plugin_host_xml_writer_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  577. struct ak_wwise_plugin_analysis_task_v1;
  578. /**
  579. * \brief Base instance type for providing analysis task services through ak_wwise_plugin_analysis_task_v1.
  580. *
  581. * \sa
  582. * - ak_wwise_plugin_analysis_task_v1 C interface.
  583. * - AK::Wwise::Plugin::V1::AnalysisTask C++ class.
  584. */
  585. struct ak_wwise_plugin_analysis_task_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  586. struct ak_wwise_plugin_audio_plugin_v1;
  587. /**
  588. * \brief Base instance type for providing audio plug-in backend services through ak_wwise_plugin_audio_plugin_v1.
  589. *
  590. * \sa
  591. * - ak_wwise_plugin_audio_plugin_v1 C interface.
  592. * - AK::Wwise::Plugin::V1::AudioPlugin C++ class.
  593. */
  594. AK_WWISE_PLUGIN_DERIVE_FROM_BACKEND_INSTANCE(ak_wwise_plugin_audio_plugin_instance_v1);
  595. struct ak_wwise_plugin_conversion_v1;
  596. /**
  597. * \brief Base instance type for providing a conversion plug-in through ak_wwise_plugin_conversion_v1.
  598. *
  599. * \sa
  600. * - ak_wwise_plugin_conversion_v1 C interface.
  601. * - AK::Wwise::Plugin::V1::Conversion C++ class.
  602. */
  603. AK_WWISE_PLUGIN_DERIVE_FROM_BACKEND_INSTANCE(ak_wwise_plugin_conversion_instance_v1);
  604. struct ak_wwise_plugin_custom_data_v1;
  605. /**
  606. * \brief Base instance type for providing custom data loading and saving through ak_wwise_plugin_custom_data_v1.
  607. *
  608. * \sa
  609. * - ak_wwise_plugin_custom_data_v1 C interface.
  610. * - AK::Wwise::Plugin::V1::CustomData C++ class.
  611. */
  612. struct ak_wwise_plugin_custom_data_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  613. struct ak_wwise_plugin_property_display_name_v1;
  614. /**
  615. * \brief Base instance type for providing display names to properties through ak_wwise_plugin_property_display_name_v1.
  616. *
  617. * \sa
  618. * - ak_wwise_plugin_property_display_name_v1 C interface.
  619. * - AK::Wwise::Plugin::V1::PropertyDisplayName C++ class.
  620. */
  621. struct ak_wwise_plugin_property_display_name_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  622. struct ak_wwise_plugin_feedback_aware_v1;
  623. /**
  624. * \brief Base instance type for providing property-based feedback through ak_wwise_plugin_feedback_aware_v1.
  625. *
  626. * \sa
  627. * - ak_wwise_plugin_feedback_aware_v1 C interface.
  628. * - AK::Wwise::Plugin::V1::FeedbackAware C++ class.
  629. */
  630. struct ak_wwise_plugin_feedback_aware_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  631. struct ak_wwise_plugin_gui_conversion_windows_v1;
  632. /**
  633. * \brief Base instance type for providing a Windows frontend for a conversion plug-in through ak_wwise_plugin_gui_conversion_windows_v1.
  634. *
  635. * \sa
  636. * - ak_wwise_plugin_gui_conversion_windows_v1 C interface.
  637. * - AK::Wwise::Plugin::V1::GUIConversionWindows C++ class.
  638. * - ak_wwise_plugin_conversion_v1 Conversion backend's C interface.
  639. * - AK::Wwise::Plugin::V1::Conversion Conversion frontend's C++ class.
  640. */
  641. AK_WWISE_PLUGIN_DERIVE_FROM_FRONTEND_INSTANCE(ak_wwise_plugin_gui_conversion_windows_instance_v1);
  642. struct ak_wwise_plugin_gui_windows_v1;
  643. /**
  644. * \brief Base instance type for providing a Windows frontend for an audio plug-in through ak_wwise_plugin_gui_windows_v1.
  645. *
  646. * \sa
  647. * - ak_wwise_plugin_gui_windows_v1 C interface.
  648. * - AK::Wwise::Plugin::V1::GUIWindows C++ class.
  649. * - ak_wwise_plugin_audio_plugin_v1 Audio plug-in backend's C interface.
  650. * - AK::Wwise::Plugin::V1::AudioPlugin Audio plug-in frontend's C++ class.
  651. */
  652. AK_WWISE_PLUGIN_DERIVE_FROM_FRONTEND_INSTANCE(ak_wwise_plugin_gui_windows_instance_v1);
  653. struct ak_wwise_plugin_link_backend_v1;
  654. /**
  655. * \brief Base host-provided instance to retrieve the related backend instance, as shown in the frontend.
  656. *
  657. * \sa
  658. * - ak_wwise_plugin_link_backend_v1 C interface.
  659. * - AK::Wwise::Plugin::V1::LinkBackend C++ class.
  660. */
  661. struct ak_wwise_plugin_link_backend_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  662. struct ak_wwise_plugin_link_frontend_v1;
  663. /**
  664. * \brief Base host-provided instance to retrieve the related frontend instances related to the current backend.
  665. *
  666. * \sa
  667. * - ak_wwise_plugin_link_frontend_v1 C interface.
  668. * - AK::Wwise::Plugin::V1::LinkFrontend C++ class.
  669. */
  670. struct ak_wwise_plugin_link_frontend_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  671. struct ak_wwise_plugin_media_converter_v1;
  672. /**
  673. * \brief Base instance type for providing custom media conversion through ak_wwise_plugin_media_converter_v1.
  674. *
  675. * \sa
  676. * - ak_wwise_plugin_media_converter_v1 C interface.
  677. * - AK::Wwise::Plugin::V1::MediaConverter C++ class.
  678. */
  679. struct ak_wwise_plugin_media_converter_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  680. struct ak_wwise_plugin_notifications_host_v1;
  681. /**
  682. * \brief Base instance type for receiving notifications on host changes events.
  683. *
  684. * \sa
  685. * - ak_wwise_plugin_notifications_host_v1 C interface.
  686. * - AK::Wwise::Plugin::V1::Notifications::Host_ C++ class.
  687. * - ak_wwise_plugin_host_v1 Related C host interface.
  688. * - AK::Wwise::Plugin::V1::Host Related C++ host class.
  689. */
  690. struct ak_wwise_plugin_notifications_host_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  691. struct ak_wwise_plugin_notifications_monitor_v1;
  692. /**
  693. * \brief Base instance type for receiving Sound Engine's monitoring data.
  694. *
  695. * \sa
  696. * - ak_wwise_plugin_notifications_monitor_v1 C interface.
  697. * - AK::Wwise::Plugin::V1::Notifications::Monitor C++ class.
  698. * - AK::Wwise::Plugin::MonitorData
  699. */
  700. struct ak_wwise_plugin_notifications_monitor_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  701. struct ak_wwise_plugin_notifications_object_media_v1;
  702. /**
  703. * \brief Base instance type for receiving notifications on related object media's changes.
  704. *
  705. * \sa
  706. * - ak_wwise_plugin_notifications_object_media_v1 C interface.
  707. * - AK::Wwise::Plugin::V1::Notifications::ObjectMedia_ C++ class.
  708. * - ak_wwise_plugin_host_object_media_v1 Related C host interface.
  709. * - AK::Wwise::Plugin::V1::ObjectMedia Related C++ host class.
  710. */
  711. struct ak_wwise_plugin_notifications_object_media_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  712. struct ak_wwise_plugin_notifications_object_store_v1;
  713. /**
  714. * \brief Base instance type for receiving notifications on related Object Store's changes.
  715. *
  716. * \sa
  717. * - ak_wwise_plugin_notifications_object_store_v1 C interface.
  718. * - AK::Wwise::Plugin::V1::Notifications::ObjectStore_ C++ class.
  719. * - ak_wwise_plugin_host_object_store_v1 Related C host interface.
  720. * - AK::Wwise::Plugin::V1::ObjectStore Related C++ host class.
  721. */
  722. struct ak_wwise_plugin_notifications_object_store_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  723. struct ak_wwise_plugin_notifications_property_set_v1;
  724. /**
  725. * \brief Base instance type for receiving notifications on property set's changes.
  726. *
  727. * \sa
  728. * - ak_wwise_plugin_notifications_property_set_v1 C interface.
  729. * - AK::Wwise::Plugin::V1::Notifications::PropertySet_ C++ class.
  730. * - ak_wwise_plugin_host_property_set_v1 Related C host interface.
  731. * - AK::Wwise::Plugin::V1::PropertySet Related C++ host class.
  732. */
  733. struct ak_wwise_plugin_notifications_property_set_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  734. struct ak_wwise_plugin_source_v1;
  735. /**
  736. * \brief Base instance type for providing source-specific information, through ak_wwise_plugin_source_v1.
  737. *
  738. * \sa
  739. * - ak_wwise_plugin_source_v1 C interface.
  740. * - AK::Wwise::Plugin::V1::Source C++ class.
  741. */
  742. struct ak_wwise_plugin_source_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  743. struct ak_wwise_plugin_undo_event_v1;
  744. /**
  745. * \brief Base instance type for providing custom undo operations through ak_wwise_plugin_undo_event_v1.
  746. *
  747. * \sa
  748. * - ak_wwise_plugin_undo_event_v1 C interface.
  749. * - AK::Wwise::Plugin::V1::UndoEvent C++ class.
  750. * - ak_wwise_plugin_host_undo_manager_v1 Host's C manager interface.
  751. * - AK::Wwise::Plugin::V1::UndoManager Host's C++ manager class.
  752. */
  753. struct ak_wwise_plugin_undo_event_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  754. struct ak_wwise_plugin_license_v1;
  755. /**
  756. * \brief Base instance type for providing licensing information, through ak_wwise_plugin_license_v1.
  757. *
  758. * \sa
  759. * - ak_wwise_plugin_license_v1 C interface.
  760. * - AK::Wwise::Plugin::V1::License C++ class.
  761. */
  762. struct ak_wwise_plugin_license_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  763. /**
  764. * \brief Base instance type for providing a message shown the first time an instance is created through ak_wwise_plugin_first_time_creation_message_v1.
  765. *
  766. * \sa
  767. * - ak_wwise_plugin_first_time_creation_message_v1 C interface.
  768. * - AK::Wwise::Plugin::V1::FirstTimeCreationMessage C++ class.
  769. */
  770. struct ak_wwise_plugin_first_time_creation_message_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  771. /**
  772. * \brief Base instance type for providing a device list for your custom sink through ak_wwise_plugin_sink_devices_v1.
  773. *
  774. * \sa
  775. * - ak_wwise_plugin_sink_devices_v1 C interface.
  776. * - AK::Wwise::Plugin::V1::SinkDevices C++ class.
  777. */
  778. struct ak_wwise_plugin_sink_devices_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  779. struct ak_wwise_plugin_test_service_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  780. struct ak_wwise_plugin_test_service_instance_v2 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  781. struct ak_wwise_plugin_frontend_v1;
  782. AK_WWISE_PLUGIN_DERIVE_FROM_FRONTEND_INSTANCE(ak_wwise_plugin_frontend_instance_v1);
  783. struct ak_wwise_plugin_host_frontend_model_instance_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE {};
  784. struct ak_wwise_plugin_host_frontend_model_args_v1 AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE
  785. {
  786. const char* templateName;
  787. };
  788. #undef AK_WWISE_PLUGIN_DERIVE_FROM_INSTANCE_BASE
  789. /**
  790. * \brief A definition of an undo event, with a specific interface and instance.
  791. *
  792. * Allows to bind an event from any source: Authoring or any plug-in. Allows to have multiple separate interfaces.
  793. *
  794. * - ak_wwise_plugin_undo_event_v1 C interface for an undo event.
  795. * - ak_wwise_plugin_undo_event_instance_v1 C instance for an undo event.
  796. * - AK::Wwise::Plugin::V1::UndoEvent C++ class for an undo event.
  797. * - ak_wwise_plugin_host_undo_manager_v1 C interface for the undo manager.
  798. * - AK::Wwise::Plugin::V1::UndoManager C++ class for the undo manager.
  799. */
  800. struct ak_wwise_plugin_undo_event_pair_v1
  801. {
  802. struct ak_wwise_plugin_undo_event_v1* m_interface; ///< The interface to execute that undo event's commands.
  803. struct ak_wwise_plugin_undo_event_instance_v1* m_instance; ///< The specific instance usued for that particular undo event.
  804. };
  805. typedef int ak_wwise_plugin_undo_group_id; ///< Unique identifier for a particular undo group. Useful to reopen an unapplied closed group session.
  806. /**
  807. * \brief Action to apply once this undo group is closed.
  808. *
  809. * The goal of an undo group is to keep a list of actions being executed that can be undone (for example, a
  810. * property set modification). Once the operations are all done, this indicates what should be done with the internal
  811. * operations.
  812. *
  813. * - \ref AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY : The usual operation is to open an undo group, and then close
  814. * and apply the group to the undo stack. This provides a valid Undo/Redo label, as well as a description of all
  815. * the operations that need to be done.
  816. * - \ref AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_FIRST_EVENT_NAME
  817. * and AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_LAST_EVENT_NAME are convenience operations, where the Undo
  818. * operation title is retrieved from either the first or the last event's name, instead of hard-coding it ourselves.
  819. * - \ref AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CANCEL cancels the undo operations. It happens when an abnormal
  820. * termination occurs, such as an error, or the user cancelling a lengthy operation. Since the operation states
  821. * aren't known, you are responsible to handle the stored undo yourself, and manually revert all operations first
  822. * before closing the action. An example of this operation is doing a slider drag event, where the user presses
  823. * the Escape key instead of doing a Mouse Up. Effectively, all the inner operations will simply be cancelled by storing
  824. * the initial value before doing the cancel operation on close.
  825. * - \ref AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CLOSE temporarily closes the undo state, leaving it possible to reopen
  826. * it later. This is useful during lengthy processes, such as a user dragging a slider. You are expected to
  827. * temporarily close the undo group when going out of scope, and reopening it when receiving a new system mouse drag
  828. * event in this particular example.
  829. */
  830. typedef enum {
  831. AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CLOSE, ///< Close this group session (going out of scope), but do not apply it yet.
  832. AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, ///< Close this group session permanently, and apply its operations to the englobing group.
  833. AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_FIRST_EVENT_NAME, ///< Same than AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, but copies the name of the first inner undo event as the name.
  834. AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY_LAST_EVENT_NAME, ///< Same than AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_APPLY, but copies the name of the last inner undo event as the name.
  835. AK_WWISE_PLUGIN_UNDO_GROUP_CLOSE_ACTION_CANCEL ///< Close this group session permanently, and cancel all its internal operations. Undo operations are not applied.
  836. } ak_wwise_plugin_undo_group_close_action;
  837. /**
  838. * @}
  839. */
  840. #ifdef __cplusplus
  841. namespace AK::Wwise::Plugin
  842. {
  843. using CBaseInterface = ak_wwise_plugin_base_interface; ///< \copydoc ak_wwise_plugin_base_interface
  844. using CInterfacePtr = ak_wwise_plugin_interface_ptr;
  845. using CInterfaceArrayItem = ak_wwise_plugin_interface_array_item; ///< \copydoc ak_wwise_plugin_interface_array_item
  846. using CPluginInfo = ak_wwise_plugin_info; ///< \copydoc ak_wwise_plugin_info
  847. using CPluginContainer = ak_wwise_plugin_container; ///< \copydoc ak_wwise_plugin_container
  848. using CWidget = ak_wwise_plugin_widget;
  849. using BaseInterface = CBaseInterface; ///< \copydoc ak_wwise_plugin_base_interface
  850. using InterfacePtr = CInterfacePtr;
  851. using InterfaceArrayItem = CInterfaceArrayItem; ///< \copydoc ak_wwise_plugin_interface_array_item
  852. using PluginInfo = CPluginInfo; ///< \copydoc ak_wwise_plugin_info
  853. using PluginContainer = CPluginContainer; ///< \copydoc ak_wwise_plugin_container
  854. using Widget = CWidget;
  855. }
  856. #endif