IXAudio2Voice::Stop
XAudio2 is a beta version and should not be used by shipping titles. This beta expires on February 6th, 2008.
Stops consumption of audio by the voice.
HRESULT Stop(UINT32Flags,UINT32OperationSet);
Parameters
- Flags
[in] Flags that control how the voice is stopped. 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
By default, all source buffers that are queued on the voice are forgotten. However, the XAUDIO2_KEEP_BUFFERS flag can be used to preserve the buffers and the current cursor position. This allows the voice to continue from where it left off, when it is restarted. The XAUDIO2_KEEP_BUFFERS flag can be used only on source voices, because the other voice types do not have a queue of source buffers.
By default, any pending output from voice effects (for example, reverb tails) is not played. Instead, the voice is immediately silent. The XAUDIO2_PLAY_TAILS flag can be used to continue emitting effect output after the voice stops running.
Requirements
Header: Declared in Xaudio2.h.
Library: Use Xaudio2.lib.