IXAudio2Voice::Start
XAudio2 is a beta version and should not be used by shipping titles. This beta expires on February 6th, 2008.
Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device.
HRESULT Start(UINT32Flags,UINT32OperationSet);
Parameters
- Flags
[in] Flags that control how the voice is started. Can be 0 or the following: - OperationSet
[in] Identifies this call as part of a deferred batch. See the Operation Sets overview for more information.
Return Values
Returns S_OK if successful, an error code otherwise.
Remarks
If the XAudio2 engine is stopped, the voice stops running. However, it remains in the started state, so that it starts running again as soon as the engine starts.
When first created, source voices are in the stopped state. Submix and mastering voices are in the started state.
If the buffer was previously stopped by using the XAUDIO2_PLAY_TAILS flag, and if effect output from earlier sounds is pending, it continues to be played as normal.
If the buffer was stopped without the XAUDIO2_PLAY_TAILS flag, there may be unplayed output waiting in the effect chain. In this case, there are two options. By default, the pending output is flushed when the voice starts. This avoids artifacts such as echoes of an earlier sound. However, if the XAUDIO2_PLAY_TAILS flag is used at this point, it forces the voice to play the pending effect output when the buffer starts.
Requirements
Header: Declared in Xaudio2.h.
Library: Use Xaudio2.lib.