IXAudio2::RegisterForCallbacks method (xaudio2.h)
Adds an IXAudio2EngineCallback pointer to the XAudio2 engine callback list.
Syntax
HRESULT RegisterForCallbacks(
[in] IXAudio2EngineCallback *pCallback
);
Parameters
[in] pCallback
IXAudio2EngineCallback pointer to add to the XAudio2 engine callback list.
Return value
Returns S_OK if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.
Remarks
This method can be called multiple times, allowing different components or layers of the same application to manage their own engine callback implementations separately.
It is invalid to call RegisterForCallbacks from within a callback (that is, IXAudio2EngineCallback or IXAudio2VoiceCallback). If RegisterForCallbacks is called within a callback, it returns XAUDIO2_E_INVALID_CALL.
Platform Requirements
Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)Requirements
Requirement | Value |
---|---|
Target Platform | Windows |
Header | xaudio2.h |