버전

menu_open
Wwise SDK 2022.1.18
Backend of an Authoring Plug-in

To create the backend for your plug-in, you need to create a class derived from AK::Wwise::Plugin::AudioPlugin. This base class offers the most basic methods for a Wwise Authoring plug-in, including a function to write to a SoundBank.

The main model for your plug-in is the Property Set, but Custom Data can also be managed by the plug-in backend.

class BackendSourcePlugin
{
public:
// AK::Wwise::Plugin::AudioPlugin
const GUID& in_guidPlatform,
) const override;
// AK::Wwise::Plugin::Source
double& out_dblMinDuration,
double& out_dblMaxDuration
) const override;
};
MyPlugin, // Add to container "MyPlugin"
BackendSourcePlugin, // Class to add to the container
SoundEngineSourcePlugin // Sound engine plug-in to which this plug-in corresponds
);

Generating SoundBanks

You must code your plug-in to store its current settings into banks when requested. You can do this by implementing the AK::Wwise::Plugin::AudioPlugin::GetBankParameters() method.

The parameters are written into the SoundBank as a data block. The block is then loaded directly from the SoundBank into your sound engine plug-in's parameter structure. Therefore, you must write the parameters in the same order they are declared in the parameter structure of your sound engine plug-in. For more information, refer to 매개 변수 노드 인터페이스 구현.

For example, consider the following parameter structure:

// Parameter structure for this effect.
struct AkFXSrcSineParams
{
AkReal32 fFrequency; // Frequency (in Hertz).
AkReal32 fGain; // Gain (in dBFS).
AkReal32 fDuration; // Sustain duration (only valid if finite).
};

The following implementation of AK::Wwise::Plugin::AudioPlugin::GetBankParameters() gets the current value of each property and then uses the appropriate method to write the value with the AK::Wwise::Plugin::DataWriter object received as a parameter. These actions are performed in the same order in which the members are defined in your parameter structure.

bool MySourcePlugin::GetBankParameters(
const GUID& in_guidPlatform,
AK::Wwise::Plugin::DataWriter& in_dataWriter) const
{
bool result = true;
result &= in_dataWriter.WriteReal32(m_propertySet->GetReal32(in_guidPlatform, "Frequency"));
result &= in_dataWriter.WriteReal32(m_propertySet->GetReal32(in_guidPlatform, "Gain"));
result &= in_dataWriter.WriteReal32(m_propertySet->GetReal32(in_guidPlatform, "Duration"));
return result;
}
참고: To get the current value of a property, use the getter functions provided by AK::Wwise::Plugin::PropertySet. The type requested must exactly match the type specified in the XML.

For more information about available methods for writing different types of data, refer to AK::Wwise::Plugin::DataWriter.

Managing Licenses

During SoundBank generation, Wwise queries the plug-ins for the license status they implement with the AK::Wwise::Plugin::License interface. The plug-in can implement AK::Wwise::Plugin::License::GetLicenseStatus to return one of the enumerated values in AK::Wwise::Plugin::LicenseStatus. Additionally, the plug-in can return a message with an associated severity, to be shown in the SoundBank generation log.

Returning LicenseStatus_Unlicensed or LicenseStatus_Expired will prevent the plug-in from being included in a SoundBank.

Plug-ins can implement their own schemes for license validation. Please note that you should never query a server synchronously in this function. The function needs to return an answer immediately.

If your plug-in is registered with Audiokinetic, you can leverage the license system of Wwise. Use the following implementation, which looks up the license status in the Wwise Project License:

AK::Wwise::Plugin::LicenseStatus MyPlugin::GetLicenseStatus(
const GUID& in_guidPlatform,
char* out_pszMessage,
unsigned int in_uiBufferSize)
{
uint32_t uDaysToExpiry;
m_host.GetLicenseStatus(in_guidPlatform, eType, eStatus, uDaysToExpiry);
return eStatus;
}
Wwise Authoring Plug-ins - Main include file.
Interface used to write data during sound bank generation.
bool WriteReal32(float in_value)
Writes a 32-bit, single-precision floating point value.
float AkReal32
32-bit floating point
LicenseType
License type.
Definition: PluginDef.h:59
Wwise API for general Audio Plug-in's backend.
Definition: Source.h:91
Wwise API for general Audio Plug-in's backend.
Definition: AudioPlugin.h:133
Severity
Log message severity.
Definition: PluginDef.h:103
#define AK_ADD_PLUGIN_CLASS_TO_CONTAINER(ContainerName, WwiseClassName, AudioEngineRegisteredName)
(C++) Adds a Wwise Authoring plug-in and a Sound Engine plug-in to a plug-in container.
virtual bool GetSourceDuration(double &out_dblMinDuration, double &out_dblMaxDuration) const =0
Return the minimum and maximum duration, in seconds.
virtual bool GetBankParameters(const GUID &in_guidPlatform, DataWriter &in_dataWriter) const
Obtains parameters that will be written to a bank.
Definition: AudioPlugin.h:228
LicenseStatus
License status.
Definition: PluginDef.h:67

이 페이지가 도움이 되었나요?

지원이 필요하신가요?

질문이 있으신가요? 문제를 겪고 계신가요? 더 많은 정보가 필요하신가요? 저희에게 문의해주시면 도와드리겠습니다!

지원 페이지를 방문해 주세요

작업하는 프로젝트에 대해 알려주세요. 언제든지 도와드릴 준비가 되어 있습니다.

프로젝트를 등록하세요. 아무런 조건이나 의무 사항 없이 빠른 시작을 도와드리겠습니다.

Wwise를 시작해 보세요