CreateFX function
Creates an instance of the requested XAPOFX effect.
Syntax
HRESULT WINAPI CreateFX(
CLSID clsid,
IUnknown **pEffect,
void *pInitData,
UNIT32 InitDataByteSize
);
Parameters
- clsid
-
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
-
Receives a pointer to the created XAPO instance. If CreateFX fails, pEffect is untouched.
- pInitData [optional]
-
Effect-specific initialization parameters. This is NULL if InitDataByteSize is zero.
- InitDataByteSize [optional]
-
Size of pInitData in bytes. This is zero if pInitData is NULL.
Return value
If this function succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Remarks
The created XAPO will have a reference count of 1. Client code must call IUnknown::Release after passing the XAPO to XAudio2 to allow XAudio2 to dispose of the XAPO when it is no longer needed. Use IXAudio2::CreateSourceVoice or IXAudio2Voice::SetEffectChain to pass an XAPO to XAudio2.
Platform Requirements
Windows 10 (XAudio2.9); Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)
Requirements
|
Header |
|
|---|---|
|
Library |
|
|
DLL |
|
See also