Wwise SDK 2021.1.14
_host_object_media_8h_source
Version
menu_open
link
HostObjectMedia.h
Go to the documentation of this file.
29 * \brief Wwise Authoring Plug-ins - API for retrieving and handling data files, as used in the plug-in.
40 * Plug-in object media interface. Can be used to normalize media file handling inside the project.
63 * This will copy the file in the project under the file name specified in in_pszFilePathToImport, and
67 * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will create it at 15.
68 * If you want to have empty spaces for indexes, add empty media sources with a nullptr in_pszFilePathToImport
69 * sequentially. Pass <code>(unsigned int)-1</code> as the in_Index to insert at the end of the list.
77 * \param[in] in_pszFilePathToImport (Optional) File path. Can be nullptr if the plug-in generates this file, or
79 * \param[in] in_Index Media source index. If higher than or equal to the current media source count, will
81 * \param[in] in_bReplace True to replace a file under the same name. False will succeed if the file already exists.
94 * This will not renumber the supplemental index, it will merely remove the file from that index, if existing.
115 * \brief Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSource.
117 * Used to allow the plug-in to display this information. This is the file name, and doesn't include any path.
120 * If you do not provide a buffer big enough to write the full string, the function will fail and return
144 * If you do not provide a buffer big enough to write the full string, the function will fail and return
166 * If you do not provide a buffer big enough to write the full string, the function will fail and return
204 * If you do not provide a buffer big enough to write the full string, the function will fail and return
224 * If you do not provide a buffer big enough to write the full string, the function will fail and return
265 * It is called when plugin media is added, removed or changes. This function is also called during undo or redo operations.
272 void(*NotifyPluginMediaChanged)(struct ak_wwise_plugin_notifications_object_media_instance_v1* in_this);
284 AK_WWISE_PLUGIN_BASE_INTERFACE_FROM_ID(AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_MEDIA, 1)
285 #define AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_MEDIA_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
287 .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_NOTIFICATIONS_OBJECT_MEDIA_V1_ID(), in_pluginInfo, in_data) \
313 };
323 };
328 * This will copy the file in the project under the file name specified in in_pszFilePathToImport, and
332 * You must add up indexes sequentially. If you have 0-14 indexes, adding a new one at 40 will create it at 15.
333 * If you want to have empty spaces for indexes, add empty media sources with a nullptr in_pszFilePathToImport
334 * sequentially. Pass <code>(unsigned int)-1</code> as the in_Index to insert at the end of the list.
341 * \param[in] in_pszFilePathToImport (Optional) File path. Can be nullptr if the plug-in generates this file, or
343 * \param[in] in_Index Media source index. If higher than or equal to the current media source count, will
345 * \param[in] in_bReplace True to replace a file under the same name. False will succeed if the file already exists.
354 return MKBOOL(g_cinterface->SetMediaSource(this, in_pszFilePathToImport, in_Index, in_bReplace));
360 * This will not renumber the supplemental index, it will merely remove the file from that index, if existing.
382 * \brief Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSource.
384 * Used to allow the plug-in to display this information. This is the file name, and doesn't include any path.
387 * If you do not provide a buffer big enough to write the full string, the function will fail and return
412 * If you do not provide a buffer big enough to write the full string, the function will fail and return
428 return g_cinterface->GetMediaSourceOriginalFilePath(this, out_pszFilePath, in_uiBufferSize, in_Index);
435 * If you do not provide a buffer big enough to write the full string, the function will fail and return
453 return g_cinterface->GetMediaSourceConvertedFilePath(this, out_pszFilePath, in_uiBufferSize, &in_guidPlatform, in_Index);
475 * If you do not provide a buffer big enough to write the full string, the function will fail and return
496 * If you do not provide a buffer big enough to write the full string, the function will fail and return
512 return g_cinterface->GetConvertedDirectory(this, out_pszDirectory, in_uiBufferSize, &in_guidPlatform);
538 };
548 };
587 * It is called when plugin media is added, removed or changes. This function is also called during undo or redo operations.
599 * Deriving your plug-in class from RequestObjectMedia will automatically request both ObjectMedia and
600 * Notifications::ObjectMedia_ interfaces. From this point, you will be able to derive from the virtual
601 * functions as defined in Notifications::ObjectMedia_, and access the host-provided functions in the
623 AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE(ObjectMedia, objectMedia,, public Notifications::ObjectMedia);
ak_wwise_plugin_host_object_media_v1()
Definition: HostObjectMedia.h:55
void RemoveMediaSource(unsigned int in_Index)
Requests to remove the specified index file as data input file.
Definition: HostObjectMedia.h:364
The C interface, fulfilled by your plug-in.
Definition: HostObjectMedia.h:554
unsigned int GetMediaSourceConvertedFilePath(AkOSChar *out_pszFilePath, unsigned int in_uiBufferSize, const GUID &in_guidPlatform, unsigned int in_Index) const
Retrieve the full file path of the converted plug-in data at the specified index.
Definition: HostObjectMedia.h:446
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: HostObjectMedia.h:547
InterfacePtr GetInterfacePointer()
Definition: HostObjectMedia.h:566
void(* NotifyPluginMediaChanged)(struct ak_wwise_plugin_notifications_object_media_instance_v1 *in_this)
This function is called by Wwise when any of the plug-in media changes.
Definition: HostObjectMedia.h:272
unsigned int GetConvertedDirectory(AkOSChar *out_pszDirectory, unsigned int in_uiBufferSize, const GUID &in_guidPlatform) const
Obtain the Converted directory for the plug-in and platform.
Definition: HostObjectMedia.h:506
unsigned int(* GetMediaSourceFileName)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, AkOSChar *out_pszFileName, unsigned int in_uiBufferSize, unsigned int in_Index)
Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSour...
Definition: HostObjectMedia.h:131
Base host-provided instance type for ak_wwise_plugin_host_object_media_v1.
Definition: PluginDef.h:626
static GluedInterface * g_cinterface
The unique instance of the CInterface interface. Defined at nullptr first, overridden by the Host onc...
Definition: PluginInfoGenerator.h:90
void(* RemoveMediaSource)(struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, unsigned int in_Index)
Requests to remove the specified index file as data input file.
Definition: HostObjectMedia.h:99
ObjectMedia_()
Definition: HostObjectMedia.h:577
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Definition: PluginInfoGenerator.h:51
void InvalidateMediaSource(unsigned int in_Index)
Request Wwise to perform any required conversion on the data.
Definition: HostObjectMedia.h:464
unsigned int GetOriginalDirectory(AkOSChar *out_pszDirectory, unsigned int in_uiBufferSize) const
Obtain the Original directory for the plug-in.
Definition: HostObjectMedia.h:484
bool(* SetMediaSource)(struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, const AkOSChar *in_pszFilePathToImport, unsigned int in_Index, bool in_bReplace)
Requests to set the specified file as a data input file.
Definition: HostObjectMedia.h:84
ak_wwise_plugin_notifications_object_media_instance_v1 Instance
Base instance type for receiving notifications on related object media's changes.
Definition: HostObjectMedia.h:255
@ k_interfaceVersion
The interface version, as requested by this plug-in.
Definition: HostObjectMedia.h:322
unsigned int GetMediaSourceCount() const
Retrieve the number of media source indexes.
Definition: HostObjectMedia.h:376
unsigned int(* GetMediaSourceOriginalFilePath)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, AkOSChar *out_pszFilePath, unsigned int in_uiBufferSize, unsigned int in_Index)
Retrieve the full file path of the source plug-in data at the specified index.
Definition: HostObjectMedia.h:155
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
PluginInfoGenerator: Associates an existing C Interface with a variable that can be used....
Definition: PluginInfoGenerator.h:105
unsigned int(* GetOriginalDirectory)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, AkOSChar *out_pszDirectory, unsigned int in_uiBufferSize)
Obtain the Original directory for the plug-in.
Definition: HostObjectMedia.h:214
unsigned int(* GetConvertedDirectory)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, AkOSChar *out_pszDirectory, unsigned int in_uiBufferSize, const GUID *in_guidPlatform)
Obtain the Converted directory for the plug-in and platform.
Definition: HostObjectMedia.h:235
bool SetMediaSource(const AkOSChar *in_pszFilePathToImport, unsigned int in_Index, bool in_bReplace)
Requests to set the specified file as a data input file.
Definition: HostObjectMedia.h:348
RequestedHostInterface< ObjectMedia > RequestObjectMedia
Requests a ObjectMedia interface, provided as m_objectMedia variable.
Definition: HostObjectMedia.h:604
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_HOST_OBJECT_MEDIA
2021.1 Object Media host service. ak_wwise_plugin_host_object_media_v1
Definition: PluginBaseInterface.h:79
ak_wwise_plugin_notifications_object_media_v1 CObjectMedia_
Definition: HostObjectMedia.h:518
ak_wwise_plugin_host_object_media_v1 CHostObjectMedia
Definition: HostObjectMedia.h:296
virtual void NotifyPluginMediaChanged()
This function is called by Wwise when any of the plug-in media changes.
Definition: HostObjectMedia.h:592
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
Definition: PluginInfoGenerator.h:50
Interface()
Definition: HostObjectMedia.h:556
CObjectMedia_::Instance * GetInstancePointer()
Definition: HostObjectMedia.h:570
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
Interface description and base class for every Wwise Authoring plug-in interface.
Definition: PluginBaseInterface.h:117
@ k_interfaceType
The interface type, as provided by this plug-in.
Definition: HostObjectMedia.h:537
ak_wwise_plugin_notifications_object_media_v1()
Definition: HostObjectMedia.h:257
unsigned int(* GetMediaSourceConvertedFilePath)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, AkOSChar *out_pszFilePath, unsigned int in_uiBufferSize, const GUID *in_guidPlatform, unsigned int in_Index)
Retrieve the full file path of the converted plug-in data at the specified index.
Definition: HostObjectMedia.h:178
@ k_interfaceType
The interface type, as requested by this plug-in.
Definition: HostObjectMedia.h:312
const CObjectMedia_::Instance * GetInstancePointer() const
Definition: HostObjectMedia.h:573
Base instance type for receiving notifications on related object media's changes.
Definition: PluginDef.h:821
unsigned int(* GetMediaSourceCount)(const struct ak_wwise_plugin_host_object_media_instance_v1 *in_this)
Retrieve the number of media source indexes.
Definition: HostObjectMedia.h:110
void(* InvalidateMediaSource)(struct ak_wwise_plugin_host_object_media_instance_v1 *in_this, unsigned int in_Index)
Request Wwise to perform any required conversion on the data.
Definition: HostObjectMedia.h:195
#define AK_WWISE_PLUGIN_SPECIALIZE_HOST_INTERFACE(in_name, in_varname,...)
PluginInfoGenerator: Creates a C++ host specialization for interface class specified in in_name,...
Definition: PluginInfoGenerator.h:238
virtual ~ObjectMedia_()
Definition: HostObjectMedia.h:582
V1::Notifications::ObjectMedia_ ObjectMedia
Latest version of the C++ ObjectMedia notification interface.
Definition: HostObjectMedia.h:620
unsigned int GetMediaSourceFileName(AkOSChar *out_pszFileName, unsigned int in_uiBufferSize, unsigned int in_Index) const
Retrieve the file name of the source plug-in data at the specified index, as provided in SetMediaSour...
Definition: HostObjectMedia.h:397
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
Definition: PluginHelpers.h:46
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_NOTIFICATIONS_OBJECT_MEDIA
2021.1 Object Media modification notification. ak_wwise_plugin_notifications_object_media_v1
Definition: PluginBaseInterface.h:66
Definition: AudioPlugin.h:112
unsigned int GetMediaSourceOriginalFilePath(AkOSChar *out_pszFilePath, unsigned int in_uiBufferSize, unsigned int in_Index) const
Retrieve the full file path of the source plug-in data at the specified index.
Definition: HostObjectMedia.h:422
Was this page helpful?
Need Support?
Questions? Problems? Need more info? Contact us, and we can help!
Visit our Support pageTell us about your project. We're here to help.
Register your project and we'll help you get started with no strings attached!
Get started with Wwise