Sample directory
- /cri/pc/samples/criatomex/user_effect_plugin
Data used in the sample
- /cri/common/smpdata/criatomex/
- ForUserEffectPlugin.acf
- ForUserEffectPlugin.acb
Sample Description
- This is a sample that imports user-defined effects into ADX and applies the effects before playback.
This sample uses a pre-built library of user-defined effects, but
user-defined effects can be created with the CRI ADX Audio Effect Plugin SDK.
- The user-defined effect library used in this sample is located in the following directory.
- x86 architecture library
- /cri/pc/libs/x86/Expansion/effect_plugin/cri_simple_delay_pcx86.lib
- /cri/pc/libs/x86/Expansion/effect_plugin/cri_simple_delay_pcx86D.lib
- x64 architecture library
- /cri/pc/libs/x64/Expansion/effect_plugin/cri_simple_delay_pcx64.lib
- /cri/pc/libs/x64/Expansion/effect_plugin/cri_simple_delay_pcx64D.lib
- The steps to incorporate user-defined effects into ADX are as follows.
For details on the embedding procedure, please refer to the manual included with the CRI ADX Audio Effect Plugin SDK.
- Create a runtime library and tool plugin with CRI ADX Audio Effect Plugin SDK
- Import the tool plugin into AtomCraft and build an ACF that includes user-defined effects
- Register the user-defined effect interface in the library while linking the runtime library and application
- When you execute the criAtomExAsr_RegisterEffectInterface function, you register the user-defined effect interface with the Atom library.
#include "simple_delay.h"
main
{
:
:
criAtomEx_criAtomEx_RegisterAcfFile(NULL, acf_file, NULL, 0);
:
}
CriBool criAtomExAsr_RegisterEffectInterface(CriAtomExAsrAfxInterfaceWithVersionPtr afx_interface)
Register a user-defined effect interface.
CriBool criAtomEx_Initialize(const CriAtomExConfig *config, void *work, CriSint32 work_size)
Initialize the library.
- Attention
- Care must be taken when calling the criAtomExAsr_RegisterEffectInterface and the criAtomExAsr_UnregisterEffectInterface functions.
In particular, please:
- Be sure to call the criAtomExAsr_RegisterEffectInterface function before attaching the DSP bus setting (call the criAtomEx_AttachDspBusSetting ). In order to attach the DSP bus setting including the user-defined effect, please register all the interfaces of the effect included in the DSP bus setting.
If a required effect interface is not found, an error callback will be triggered and the attachment of the DSP bus setting will fail.
- Call the criAtomExAsr_UnregisterEffectInterface function with the DSP bus setting detached. Once registered, the effect interface will continue to be referenced from the library until you exit the Atom library or call the criAtomExAsr_UnregisterEffectInterface function.
An access violation exception may occur if you cancel the registration of the interface while still performing signal processing, such as during the playback of sound.
Therefore, please unregister the effect interface only after the DSP bus setting is detached.
- The registration of all the effect interfaces will be canceled during the finalization of the library (at the time of execution of the criAtomEx_Finalize function)
When re-initializing the library, you need to re-register the necessary effect interfaces.