IXAudio2SourceVoice::GetState Method

Returns the voice's current cursor position data.

Syntax

void GetState(
         XAUDIO2_VOICE_STATE *pVoiceState
)

Parameters

Return Value

None.

Remarks

If a client needs to obtain the correlated positions of several voices (i.e. to know exactly which sample of a given voice is playing when a given sample of another voice is playing) it must make GetState calls in an XAudio2 engine callback, to ensure that none of the voices advance while the calls are being made. See the XAudio2 Callbacks overview for information about using XAudio2 callbacks.

Requirements

Header: Declared in xaudio2.h.

See Also

IXAudio2SourceVoice
How to: Stream a Sound from Disk