Creates an instance of the requested XAPOFX effect.
FX_API_(HRESULT) CreateFX(
REFCLSID clsid,
IUnknown **pEffect,
const void *pInitData,
UINT32 InitDataByteSize
)
clsid
Type: REFCLSID
ID of the effect to create. Use the __uuidof on the effect class name to get the CLSID for an effect. For example, __uuidof(FXReverb) would provide the CLSID for the FXReverb effect. For a list of effects provided by XAPOFX, see XAPOFX Overview. For an example of retrieving the CLSID for an effect, see How to: Use XAPOFX in XAudio2.
pEffect
Type: IUnknown **
[out] Receives a pointer to the created XAPO instance. If CreateFX fails, pEffect is untouched.
*pInitData
Type: void
[in, optional] Effect-specific initialization parameters. This may be NULL if InitDataByteSize is zero.
InitDataByteSize
Type: UINT32
Size of pInitData in bytes. This may be zero if pInitData is NULL.
Type: FX_API_(HRESULT)
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
The created XAPO will have a reference count of 1. Client code should call IUnknown::Release after passing the XAPO to XAudio2 to allow XAudio2 to dispose of the XAPO when it is no longer needed. UseIXAudio2::CreateSourceVoice or SetEffectChain to pass an XAPO to XAudio2.
Header: Declared in xapofx.h.
Library: Use xapobase.lib.