HostObjectMedia.h 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629
  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 - API for retrieving and handling data files, as used in the plug-in.
  22. * \file AK/Wwise/Plugin/HostObjectMedia.h
  23. */
  24. #pragma once
  25. #include "PluginInfoGenerator.h"
  26. #include <AK/SoundEngine/Common/AkTypes.h>
  27. /**
  28. * Plug-in object media interface. Can be used to normalize media file handling inside the project.
  29. */
  30. struct ak_wwise_plugin_host_object_media_v1
  31. #ifdef __cplusplus
  32. : public ak_wwise_plugin_base_interface
  33. #endif
  34. {
  35. #ifndef __cplusplus
  36. ak_wwise_plugin_base_interface m_baseInterface;
  37. #endif
  38. #ifdef __cplusplus
  39. /// Base host-provided instance type for ak_wwise_plugin_host_object_media_v1.
  40. using Instance = ak_wwise_plugin_host_object_media_instance_v1;
  41. ak_wwise_plugin_host_object_media_v1() :
  42. ak_wwise_plugin_base_interface(AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_MEDIA, 1)
  43. {}
  44. #endif
  45. /**
  46. * \brief Requests to set the specified file as a data input file.
  47. *
  48. * This will copy the file in the project under the file name specified in in_pszFilePathToImport, and
  49. * create or replace a Media Source at the given index.
  50. *
  51. * \aknote
  52. * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will create it at 15.
  53. * If you want to have empty spaces for indexes, add empty media sources with a nullptr in_pszFilePathToImport
  54. * sequentially. Pass <code>(unsigned int)-1</code> as the in_Index to insert at the end of the list.
  55. * \endaknote
  56. *
  57. * \akwarning
  58. * You should not put the same file in two different indexes.
  59. * \endakwarning
  60. *
  61. * \param[in] in_this Current instance of this interface.
  62. * \param[in] in_pszFilePathToImport (Optional) File path. Can be nullptr if the plug-in generates this file, or
  63. * if the file is not yet available.
  64. * \param[in] in_Index Media source index. If higher than or equal to the current media source count, will
  65. * add a new index.
  66. * \param[in] in_bReplace True to replace a file under the same name. False will succeed if the file already exists.
  67. * \return true if succeeded.
  68. */
  69. bool(*SetMediaSource)(
  70. struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  71. const AkOSChar * in_pszFilePathToImport,
  72. unsigned int in_Index,
  73. bool in_bReplace
  74. );
  75. /**
  76. * \brief Requests to remove the specified index file as data input file.
  77. *
  78. * This will not renumber the supplemental index, it will merely remove the file from that index, if existing.
  79. *
  80. * \param[in] in_this Current instance of this interface.
  81. * \param[in] in_Index Media source index to remove.
  82. */
  83. void(*RemoveMediaSource)(
  84. struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  85. unsigned int in_Index
  86. );
  87. /**
  88. * \brief Retrieve the number of media source indexes.
  89. *
  90. * \param[in] in_this Current instance of this interface.
  91. * \return Count of media sources.
  92. */
  93. unsigned int(*GetMediaSourceCount)(
  94. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this
  95. );
  96. /**
  97. * \brief Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSource.
  98. *
  99. * Used to allow the plug-in to display this information. This is the file name, and doesn't include any path.
  100. *
  101. * \akwarning
  102. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  103. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  104. * max path size.
  105. * \endakwarning
  106. *
  107. * \param[in] in_this Current instance of this interface.
  108. * \param[out] out_pszFileName Buffer that will contain the file name.
  109. * \param[in] in_uiBufferSize Size of the provided string buffer.
  110. * \param[in] in_Index Media source index to query.
  111. * \return Number of characters written to the buffer. 0 means no file, or failure.
  112. */
  113. unsigned int(*GetMediaSourceFileName)(
  114. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  115. AkOSChar * out_pszFileName,
  116. unsigned int in_uiBufferSize,
  117. unsigned int in_Index
  118. );
  119. /**
  120. * \brief Retrieve the full file path of the source plug-in data at the specified index.
  121. *
  122. * This is the path name of the data file, as kept in the project directory.
  123. *
  124. * \akwarning
  125. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  126. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  127. * max path size.
  128. * \endakwarning
  129. *
  130. * \param[in] in_this Current instance of this interface.
  131. * \param[out] out_pszFilePath Buffer that will contain the original file path.
  132. * \param[in] in_uiBufferSize Size of the provided string buffer.
  133. * \param[in] in_Index Media source index to query.
  134. * \return Number of characters written to the buffer. 0 means no file, or failure.
  135. */
  136. unsigned int(*GetMediaSourceOriginalFilePath)(
  137. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  138. AkOSChar * out_pszFilePath,
  139. unsigned int in_uiBufferSize,
  140. unsigned int in_Index
  141. );
  142. /**
  143. * \brief Retrieve the full file path of the converted plug-in data at the specified index.
  144. *
  145. * \akwarning
  146. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  147. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  148. * max path size.
  149. * \endakwarning
  150. *
  151. * \param[in] in_this Current instance of this interface.
  152. * \param[out] out_pszFilePath Buffer that will contain the converted file path.
  153. * \param[in] in_uiBufferSize Size of the provided string buffer.
  154. * \param[in] in_guidPlatform GUID of the platform to query.
  155. * \param[in] in_Index Media source index to query.
  156. * \return Number of characters written to the buffer. 0 means no file, or failure.
  157. */
  158. unsigned int(*GetMediaSourceConvertedFilePath)(
  159. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  160. AkOSChar * out_pszFilePath,
  161. unsigned int in_uiBufferSize,
  162. const GUID* in_guidPlatform,
  163. unsigned int in_Index
  164. );
  165. /**
  166. * \brief Request Wwise to perform any required conversion on the data.
  167. *
  168. * \sa
  169. * - \ref AK::Wwise::Plugin::MediaConverter.
  170. *
  171. * \param[in] in_this Current instance of this interface.
  172. * \param[in] in_Index Media source index to invalidate.
  173. */
  174. void(*InvalidateMediaSource)(
  175. struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  176. unsigned int in_Index
  177. );
  178. /**
  179. * \brief Obtain the Original directory for the plug-in.
  180. *
  181. * \akwarning
  182. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  183. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  184. * max path size.
  185. * \endakwarning
  186. *
  187. * \param[in] in_this Current instance of this interface.
  188. * \param[out] out_pszDirectory Buffer that will contain the path.
  189. * \param[in] in_uiBufferSize Size of the provided string buffer.
  190. * \return Number of characters written to the buffer. 0 means a failure.
  191. */
  192. unsigned int(*GetOriginalDirectory)(
  193. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  194. AkOSChar * out_pszDirectory,
  195. unsigned int in_uiBufferSize
  196. );
  197. /**
  198. * \brief Obtain the Converted directory for the plug-in and platform.
  199. *
  200. * \akwarning
  201. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  202. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  203. * max path size.
  204. * \endakwarning
  205. *
  206. * \param[in] in_this Current instance of this interface.
  207. * \param[out] out_pszDirectory Buffer that will contain the path.
  208. * \param[in] in_uiBufferSize Size of the provided string buffer.
  209. * \param[in] in_guidPlatform GUID of the platform to query.
  210. * \return Number of characters written to the buffer. 0 means a failure.
  211. */
  212. unsigned int(*GetConvertedDirectory)(
  213. const struct ak_wwise_plugin_host_object_media_instance_v1* in_this,
  214. AkOSChar * out_pszDirectory,
  215. unsigned int in_uiBufferSize,
  216. const GUID* in_guidPlatform
  217. );
  218. };
  219. struct ak_wwise_plugin_notifications_object_media_v1
  220. #ifdef __cplusplus
  221. : public ak_wwise_plugin_base_interface
  222. #endif
  223. {
  224. #ifndef __cplusplus
  225. ak_wwise_plugin_base_interface m_baseInterface;
  226. #endif
  227. #ifdef __cplusplus
  228. /// Base instance type for receiving notifications on related object media's changes.
  229. using Instance = ak_wwise_plugin_notifications_object_media_instance_v1;
  230. ak_wwise_plugin_notifications_object_media_v1() :
  231. ak_wwise_plugin_base_interface(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_MEDIA, 1)
  232. {}
  233. #endif
  234. /**
  235. * \brief This function is called by Wwise when any of the plug-in media changes.
  236. *
  237. * It is called when plugin media is added, removed or changes. This function is also called during undo or redo operations.
  238. *
  239. * \sa
  240. * - \ref effectplugin_media_managing
  241. *
  242. * \param[in] in_this Current instance of this interface.
  243. */
  244. void(*NotifyPluginMediaChanged)(struct ak_wwise_plugin_notifications_object_media_instance_v1* in_this);
  245. };
  246. #define AK_WWISE_PLUGIN_HOST_OBJECT_MEDIA_V1_ID() \
  247. AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_MEDIA, 1)
  248. #define AK_WWISE_PLUGIN_HOST_OBJECT_MEDIA_V1_CTOR() \
  249. { \
  250. .m_baseInterface = AK_WWISE_PLUGIN_HOST_OBJECT_MEDIA_V1_ID() \
  251. }
  252. #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_MEDIA_V1_ID() \
  253. AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_MEDIA, 1)
  254. #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_MEDIA_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
  255. { \
  256. .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_MEDIA_V1_ID(), in_pluginInfo, in_data) \
  257. }
  258. #ifdef __cplusplus
  259. namespace AK::Wwise::Plugin
  260. {
  261. namespace V1
  262. {
  263. using CHostObjectMedia = ak_wwise_plugin_host_object_media_v1;
  264. /// \copydoc ak_wwise_plugin_host_object_media_v1
  265. class ObjectMedia : public CBaseInstanceGlue<CHostObjectMedia>
  266. {
  267. public:
  268. using Interface = CHostObjectMedia;
  269. /**
  270. * \brief The interface type, as requested by this plug-in.
  271. */
  272. enum : InterfaceTypeValue
  273. {
  274. /**
  275. * \brief The interface type, as requested by this plug-in.
  276. */
  277. k_interfaceType = AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_MEDIA
  278. };
  279. /**
  280. * \brief The interface version, as requested by this plug-in.
  281. */
  282. enum : InterfaceVersion
  283. {
  284. /**
  285. * \brief The interface version, as requested by this plug-in.
  286. */
  287. k_interfaceVersion = 1
  288. };
  289. /**
  290. * \brief Requests to set the specified file as a data input file.
  291. *
  292. * This will copy the file in the project under the file name specified in in_pszFilePathToImport, and
  293. * create or replace a Media Source at the given index.
  294. *
  295. * \aknote
  296. * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will create it at 15.
  297. * If you want to have empty spaces for indexes, add empty media sources with a nullptr in_pszFilePathToImport
  298. * sequentially. Pass <code>(unsigned int)-1</code> as the in_Index to insert at the end of the list.
  299. * \endaknote
  300. *
  301. * \akwarning
  302. * You should not put the same file in two different indexes.
  303. * \endakwarning
  304. *
  305. * \param[in] in_pszFilePathToImport (Optional) File path. Can be nullptr if the plug-in generates this file, or
  306. * if the file is not yet available.
  307. * \param[in] in_Index Media source index. If higher than or equal to the current media source count, will
  308. * add a new index.
  309. * \param[in] in_bReplace True to replace a file under the same name. False will succeed if the file already exists.
  310. * \return true if succeeded.
  311. */
  312. inline bool SetMediaSource(
  313. const AkOSChar * in_pszFilePathToImport,
  314. unsigned int in_Index,
  315. bool in_bReplace
  316. )
  317. {
  318. return MKBOOL(g_cinterface->SetMediaSource(this, in_pszFilePathToImport, in_Index, in_bReplace));
  319. }
  320. /**
  321. * \brief Requests to remove the specified index file as data input file.
  322. *
  323. * This will not renumber the supplemental index, it will merely remove the file from that index, if existing.
  324. *
  325. * \param[in] in_Index Media source index to remove.
  326. */
  327. inline void RemoveMediaSource(
  328. unsigned int in_Index
  329. )
  330. {
  331. g_cinterface->RemoveMediaSource(this, in_Index);
  332. }
  333. /**
  334. * \brief Retrieve the number of media source indexes.
  335. *
  336. * \return Count of media sources.
  337. */
  338. inline unsigned int GetMediaSourceCount() const
  339. {
  340. return g_cinterface->GetMediaSourceCount(this);
  341. }
  342. /**
  343. * \brief Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSource.
  344. *
  345. * Used to allow the plug-in to display this information. This is the file name, and doesn't include any path.
  346. *
  347. * \akwarning
  348. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  349. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  350. * max path size.
  351. * \endakwarning
  352. *
  353. * \param[out] out_pszFileName Buffer that will contain the file name.
  354. * \param[in] in_uiBufferSize Size of the provided string buffer.
  355. * \param[in] in_Index Media source index to query.
  356. * \return Number of characters written to the buffer. 0 means no file, or failure.
  357. */
  358. inline unsigned int GetMediaSourceFileName(
  359. AkOSChar * out_pszFileName,
  360. unsigned int in_uiBufferSize,
  361. unsigned int in_Index
  362. ) const
  363. {
  364. return g_cinterface->GetMediaSourceFileName(this, out_pszFileName, in_uiBufferSize, in_Index);
  365. }
  366. /**
  367. * \brief Retrieve the full file path of the source plug-in data at the specified index.
  368. *
  369. * This is the path name of the data file, as kept in the project directory.
  370. *
  371. * \akwarning
  372. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  373. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  374. * max path size.
  375. * \endakwarning
  376. *
  377. * \param[out] out_pszFilePath Buffer that will contain the original file path.
  378. * \param[in] in_uiBufferSize Size of the provided string buffer.
  379. * \param[in] in_Index Media source index to query.
  380. * \return Number of characters written to the buffer. 0 means no file, or failure.
  381. */
  382. inline unsigned int GetMediaSourceOriginalFilePath(
  383. AkOSChar * out_pszFilePath,
  384. unsigned int in_uiBufferSize,
  385. unsigned int in_Index
  386. ) const
  387. {
  388. return g_cinterface->GetMediaSourceOriginalFilePath(this, out_pszFilePath, in_uiBufferSize, in_Index);
  389. }
  390. /**
  391. * \brief Retrieve the full file path of the converted plug-in data at the specified index.
  392. *
  393. * \akwarning
  394. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  395. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  396. * max path size.
  397. * \endakwarning
  398. *
  399. * \param[out] out_pszFilePath Buffer that will contain the converted file path.
  400. * \param[in] in_uiBufferSize Size of the provided string buffer.
  401. * \param[in] in_guidPlatform GUID of the platform to query.
  402. * \param[in] in_Index Media source index to query.
  403. * \return Number of characters written to the buffer. 0 means no file, or failure.
  404. */
  405. inline unsigned int GetMediaSourceConvertedFilePath(
  406. AkOSChar * out_pszFilePath,
  407. unsigned int in_uiBufferSize,
  408. const GUID& in_guidPlatform,
  409. unsigned int in_Index
  410. ) const
  411. {
  412. return g_cinterface->GetMediaSourceConvertedFilePath(this, out_pszFilePath, in_uiBufferSize, &in_guidPlatform, in_Index);
  413. }
  414. /**
  415. * \brief Request Wwise to perform any required conversion on the data.
  416. *
  417. * \sa
  418. * - \ref AK::Wwise::Plugin::MediaConverter.
  419. *
  420. * \param[in] in_Index Media source index to invalidate.
  421. */
  422. inline void InvalidateMediaSource(
  423. unsigned int in_Index
  424. )
  425. {
  426. return g_cinterface->InvalidateMediaSource(this, in_Index);
  427. }
  428. /**
  429. * \brief Obtain the Original directory for the plug-in.
  430. *
  431. * \akwarning
  432. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  433. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  434. * max path size.
  435. * \endakwarning
  436. *
  437. * \param[out] out_pszDirectory Buffer that will contain the path.
  438. * \param[in] in_uiBufferSize Size of the provided string buffer.
  439. * \return Number of characters written to the buffer. 0 means a failure.
  440. */
  441. inline unsigned int GetOriginalDirectory(
  442. AkOSChar * out_pszDirectory,
  443. unsigned int in_uiBufferSize
  444. ) const
  445. {
  446. return g_cinterface->GetOriginalDirectory(this, out_pszDirectory, in_uiBufferSize);
  447. }
  448. /**
  449. * \brief Obtain the Converted directory for the plug-in and platform.
  450. *
  451. * \akwarning
  452. * If you do not provide a buffer big enough to write the full string, the function will fail and return
  453. * 0. Make sure to use a buffer big enough to write the entire string, such as your platform's
  454. * max path size.
  455. * \endakwarning
  456. *
  457. * \param[out] out_pszDirectory Buffer that will contain the path.
  458. * \param[in] in_uiBufferSize Size of the provided string buffer.
  459. * \param[in] in_guidPlatform GUID of the platform to query.
  460. * \return Number of characters written to the buffer. 0 means a failure.
  461. */
  462. inline unsigned int GetConvertedDirectory(
  463. AkOSChar * out_pszDirectory,
  464. unsigned int in_uiBufferSize,
  465. const GUID& in_guidPlatform
  466. ) const
  467. {
  468. return g_cinterface->GetConvertedDirectory(this, out_pszDirectory, in_uiBufferSize, &in_guidPlatform);
  469. }
  470. };
  471. namespace Notifications
  472. {
  473. using CObjectMedia_ = ak_wwise_plugin_notifications_object_media_v1;
  474. /// \copydoc ak_wwise_plugin_notifications_object_media_v1
  475. class ObjectMedia_ : public CObjectMedia_::Instance
  476. {
  477. public:
  478. /**
  479. * \copydoc CObjectMedia_::Instance
  480. */
  481. using Instance = CObjectMedia_::Instance;
  482. /**
  483. * \brief The interface type, as provided by this plug-in.
  484. */
  485. enum : InterfaceTypeValue
  486. {
  487. /**
  488. * \brief The interface type, as provided by this plug-in.
  489. */
  490. k_interfaceType = AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_MEDIA
  491. };
  492. /**
  493. * \brief The interface version, as provided by this plug-in.
  494. */
  495. enum : InterfaceVersion
  496. {
  497. /**
  498. * \brief The interface version, as provided by this plug-in.
  499. */
  500. k_interfaceVersion = 1
  501. };
  502. /**
  503. * \brief The C interface, fulfilled by your plug-in.
  504. */
  505. struct Interface : public CObjectMedia_
  506. {
  507. using Instance = ObjectMedia_;
  508. Interface()
  509. {
  510. CObjectMedia_::NotifyPluginMediaChanged = [](
  511. struct ak_wwise_plugin_notifications_object_media_instance_v1* in_this)
  512. {
  513. static_cast<Instance*>(in_this)->NotifyPluginMediaChanged();
  514. };
  515. }
  516. };
  517. InterfacePtr GetInterfacePointer() {
  518. static Interface g_interface;
  519. return &g_interface;
  520. }
  521. CObjectMedia_::Instance* GetInstancePointer() {
  522. return this;
  523. }
  524. const CObjectMedia_::Instance* GetInstancePointer() const {
  525. return this;
  526. }
  527. ObjectMedia_() :
  528. CObjectMedia_::Instance()
  529. {
  530. }
  531. virtual ~ObjectMedia_() {}
  532. /**
  533. * \brief This function is called by Wwise when any of the plug-in media changes.
  534. *
  535. * It is called when plugin media is added, removed or changes. This function is also called during undo or redo operations.
  536. *
  537. * \sa
  538. * - \ref effectplugin_media_managing
  539. */
  540. virtual void NotifyPluginMediaChanged() {}
  541. };
  542. } // of namespace Notifications
  543. /**
  544. * \brief Requests a ObjectMedia interface, provided as m_objectMedia variable.
  545. *
  546. * Deriving your plug-in class from RequestObjectMedia will automatically request both ObjectMedia and
  547. * Notifications::ObjectMedia_ interfaces. From this point, you will be able to derive from the virtual
  548. * functions as defined in Notifications::ObjectMedia_, and access the host-provided functions in the
  549. * \c m_objectMedia variable.
  550. */
  551. using RequestObjectMedia = RequestedHostInterface<ObjectMedia>;
  552. } // of namespace V1
  553. /// Latest version of the C ObjectMedia interface.
  554. using CHostObjectMedia = V1::CHostObjectMedia;
  555. /// Latest version of the C++ ObjectMedia interface.
  556. using ObjectMedia = V1::ObjectMedia;
  557. /// Latest version of the requested C++ ObjectMedia interface.
  558. using RequestObjectMedia = V1::RequestObjectMedia;
  559. namespace Notifications
  560. {
  561. /// Latest version of the C ObjectMedia notification interface.
  562. using CObjectMedia = V1::Notifications::CObjectMedia_;
  563. /// Latest version of the C++ ObjectMedia notification interface.
  564. using ObjectMedia = V1::Notifications::ObjectMedia_;
  565. }
  566. AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE(ObjectMedia, objectMedia,, public Notifications::ObjectMedia);
  567. AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(ObjectMedia);
  568. AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(ObjectMedia);
  569. AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(Notifications::ObjectMedia);
  570. AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(Notifications::ObjectMedia);
  571. } // of namespace AK::Wwise::Plugin
  572. #endif