IXAudio2SourceVoice::GetPosition

IXAudio2SourceVoice::GetPosition

Returns the current cursor position for the voice.

  HRESULT 
  GetPosition(
  XAUDIO2_POSITION *pPosition
);

Parameters

Return Values

Returns S_OK if successful; returns an error code otherwise. See XAudio2 Error Codes for descriptions of XAudio2 specific error codes.

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 GetPosition 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