Returns the voice's current cursor position data.
Pointer to an XAUDIO2_VOICE_STATE structure containing the state of the voice.
- Flags [optional]
Flags controlling which voice state data should be returned. Valid values are 0 or XAUDIO2_VOICE_NOSAMPLESPLAYED. The default value is 0. If you specify XAUDIO2_VOICE_NOSAMPLESPLAYED, GetState returns only the buffer state, not the sampler state. GetState takes roughly one-third as much time to complete when you specify XAUDIO2_VOICE_NOSAMPLESPLAYED.
This method does not return a value.
If a client needs to get the correlated positions of several voices (for example, 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. This ensures that none of the voices advance while the calls are being made. See the XAudio2 Callbacks overview for information about using XAudio2 callbacks.
Note that the DirectX SDK versions of XAUDIO2 do not take the Flags parameter for GetState.
Windows 8, Windows Phone 8 (XAudio 2.8); DirectX SDK (XAudio 2.7)