Wwise SDK 2021.1.14
_media_converter_8h_source
Version
menu_open
link
MediaConverter.h
Go to the documentation of this file.
39 * \brief API to convert used object medias to a format usable by the plug-in's Sound Engine part.
62 * \aknote If the conversion failed the function is responsible for deleting any files that may have been
63 * created, even the destination file in case of error. If the function returns false we will use the
71 * \param[in] in_uSampleRate The target sample rate for the converted file, passing 0 will default to
75 * \param io_pError Optional error string that can be displayed if ConversionResult is not successful.
93 * The goal of this function is to return a value that can be used to indicate whether the plug-in information changed
94 * between two conversion requests. Each time a SoundBank generation is done, that value is stored, and if it's
98 * \param[in] in_guidPlatform The unique ID of the custom platform for which the conversion is being done.
99 * \param[in] in_uSampleRate The target sample rate for the converted file, passing 0 will default to
113 #define AK_WWISE_PLUGIN_MEDIA_CONVERTER_V1_CTOR(/* ak_wwise_plugin_info* */ in_pluginInfo, /* void* */ in_data) \
115 .m_baseInterface = AK_WWISE_PLUGIN_BASE_INTERFACE_CTOR(AK_WWISE_PLUGIN_MEDIA_CONVERTER_V1_ID(), in_pluginInfo, in_data) \
137 };
147 };
157 CMediaConverter::ConvertFile = [](const struct ak_wwise_plugin_media_converter_instance_v1* in_this, const GUID* in_guidPlatform, const BasePlatformID* in_basePlatform, const AkOSChar * in_szSourceFile, const AkOSChar * in_szDestFile, AkUInt32 in_uSampleRate, AkUInt32 in_uBlockLength, IProgress* in_pProgress, IWriteString* io_pError)
158 { return (ConversionResult)static_cast<const Instance*>(in_this)->ConvertFile(*in_guidPlatform, *in_basePlatform, in_szSourceFile, in_szDestFile, in_uSampleRate, in_uBlockLength, in_pProgress, io_pError); };
159 CMediaConverter::GetCurrentConversionSettingsHash = [](const struct ak_wwise_plugin_media_converter_instance_v1* in_this, const GUID* in_guidPlatform, AkUInt32 in_uSampleRate, AkUInt32 in_uBlockLength)
160 { return (uint32_t)static_cast<const Instance*>(in_this)->GetCurrentConversionSettingsHash(*in_guidPlatform, in_uSampleRate, in_uBlockLength); };
185 * \aknote If the conversion failed the function is responsible for deleting any files that may have been
186 * created, even the destination file in case of error. If the function returns false we will use the
193 * \param[in] in_uSampleRate The target sample rate for the converted file, passing 0 will default to
197 * \param io_pError Optional error string that can be displayed if ConversionResult is not successful.
214 * The goal of this function is to return a value that can be used to indicate whether the plug-in information changed
215 * between two conversion requests. Each time a SoundBank generation is done, that value is stored, and if it's
218 * \param[in] in_guidPlatform The unique ID of the custom platform for which the conversion is being done.
uint32_t(* GetCurrentConversionSettingsHash)(const struct ak_wwise_plugin_media_converter_instance_v1 *in_this, const GUID *in_guidPlatform, AkUInt32 in_uSampleRate, AkUInt32 in_uBlockLength)
Calculates the conversion setting's hash.
Definition: MediaConverter.h:104
V1::MediaConverter MediaConverter
Latest version of the C++ MediaConverter interface.
Definition: MediaConverter.h:235
ak_wwise_plugin_media_converter_v1()
Definition: MediaConverter.h:54
The C interface, fulfilled by your plug-in.
Definition: MediaConverter.h:153
API to convert used object medias to a format usable by the plug-in's Sound Engine part.
Definition: MediaConverter.h:45
decltype(BaseInterface::m_version) InterfaceVersion
PluginInfoGenerator: Type for the m_version value in BaseInterface.
Definition: PluginInfoGenerator.h:51
Base instance type for providing custom media conversion through ak_wwise_plugin_media_converter_v1.
Definition: PluginDef.h:786
const CMediaConverter::Instance * GetInstancePointer() const
Definition: MediaConverter.h:171
Definition: PlatformID.h:41
virtual ~MediaConverter()
Definition: MediaConverter.h:180
virtual ConversionResult ConvertFile(const GUID &in_guidPlatform, const BasePlatformID &in_basePlatform, const AkOSChar *in_szSourceFile, const AkOSChar *in_szDestFile, AkUInt32 in_uSampleRate, AkUInt32 in_uBlockLength, IProgress *in_pProgress, IWriteString *io_pError) const =0
Converts a file.
AK::Wwise::Plugin::ConversionResult(* ConvertFile)(const struct ak_wwise_plugin_media_converter_instance_v1 *in_this, const GUID *in_guidPlatform, const BasePlatformID *in_basePlatform, const AkOSChar *in_szSourceFile, const AkOSChar *in_szDestFile, AkUInt32 in_uSampleRate, AkUInt32 in_uBlockLength, AK::Wwise::Plugin::IProgress *in_pProgress, AK::Wwise::Plugin::IWriteString *io_pError)
Converts a file.
Definition: MediaConverter.h:78
Wwise Authoring Plug-ins - C++ class helper to automatically determine the plug-in interfaces used in...
CMediaConverter::Instance * GetInstancePointer()
Definition: MediaConverter.h:168
@ k_interfaceVersion
The interface version, as provided by this plug-in.
Definition: MediaConverter.h:146
std::underlying_type< InterfaceType >::type InterfaceTypeValue
PluginInfoGenerator: Underlying storage type for the m_interface value in BaseInterface.
Definition: PluginInfoGenerator.h:50
ak_wwise_plugin_media_converter_v1 CMediaConverter
Definition: MediaConverter.h:124
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_VERSION(AudioPlugin)
MediaConverter()
Definition: MediaConverter.h:175
Interface description and base class for every Wwise Authoring plug-in interface.
Definition: PluginBaseInterface.h:117
Definition: PluginDef.h:173
Interface()
Definition: MediaConverter.h:155
virtual uint32_t GetCurrentConversionSettingsHash(const GUID &in_guidPlatform, AkUInt32 in_uSampleRate=0, AkUInt32 in_uBlockLength=0) const =0
Calculates the conversion setting's hash.
Definition: PluginDef.h:149
InterfacePtr GetInterfacePointer()
Definition: MediaConverter.h:164
@ AK_WWISE_PLUGIN_INTERFACE_TYPE_MEDIA_CONVERTER
2021.1 Media Converter backend part. ak_wwise_plugin_media_converter_v1
Definition: PluginBaseInterface.h:63
AK_WWISE_PLUGIN_SPECIALIZE_INTERFACE_CLASS(AudioPlugin)
Definition: PluginHelpers.h:46
Definition: AudioPlugin.h:112
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