Starts the audio processing thread.
public:
HRESULT StartEngine()
Type: HRESULTÂ
Returns S_OK if successful, an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.
To correctly pause XAudio2, for example as required by the user when entering Constrained mode, a title should call StopEngine. When resuming a call should be made to StartEngine.
After StartEngine is called, all started voices begin to consume audio. All enabled effects start running, and the resulting audio is sent to any connected output devices. When XAudio2 is first initialized, the engine is already in the started state.
It is invalid to call StartEngine from within a callback (that is, IXAudio2EngineCallback or IXAudio2VoiceCallback). If StartEngine is called within a callback, it returns XAUDIO2_E_INVALID_CALL.
Header: Declared in xaudio2.h.
Library: Use xaudio2.lib.