IMiniportStreamAudioEngineNode2::SetStreamCurrentWritePositionForLastBuffer method

Sets the current cursor position in the last audio data stream that was written to the audio buffer.


NTSTATUS SetStreamCurrentWritePositionForLastBuffer(
  ULONG _ulWritePosition



The current cursor position in the last audio data stream.

Return value

SetStreamCurrentWritePositionForLastBuffer returns S_OK if the call was successful. Otherwise, the method returns an appropriate error code.


When a client app performs the very last write operation to the audio buffer to be processed by the audio driver of an offloaded stream, the audio driver calls SetStreamCurrentWritePositionForLastBuffer. The SetStreamCurrentWritePositionForLastBuffer method indicates the “write position” of the very last buffer in a stream. Note that this last buffer could be only partially filled.

If the buffer is only partially filled, then the audio driver needs to notify the audio engine when the last valid byte in the buffer has been rendered. This differs from the normal functionality where the audio driver notified the audio engine when the driver fetched the last byte in the buffer.


Minimum supported client Windows 8.1
Minimum supported server Windows Server 2012 R2
Target Platform Universal
Header portcls.h

See also