// acxelements.h
EVT_ACX_STREAMAUDIOENGINE_RETRIEVE_PRESENTATION_POSITION EvtAcxStreamaudioengineRetrievePresentationPosition;
NTSTATUS EvtAcxStreamaudioengineRetrievePresentationPosition(
ACXSTREAMAUDIOENGINE StreamAudioEngine,
PULONGLONG PositionInBlocks,
PULONGLONG QPCPosition
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The EVT_ACX_STREAMAUDIOENGINE_RETRIEVE_PRESENTATION_POSITION callback function is implemented by the driver and is called to retrieve the current position within the audio data being rendered to the stream audio engine node.
StreamAudioEngineAn existing, initialized, ACXSTREAMAUDIOENGINE object. For more information about ACX objects, see Summary of ACX Objects.
PositionInBlocksSpecifies the block offset from the start of the stream to the current post-decoded, uncompressed position in the stream. See KSAUDIO_PRESENTATION_POSITION structure for more information on this value.
QPCPositionSpecifies the value of the performance counter at the time that the audio driver reads the presentation position in response to the callback. See KSAUDIO_PRESENTATION_POSITION structure for more information on this value.
Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.
Example usage is shown below.
EVT_ACX_STREAMAUDIOENGINE_RETRIEVE_PRESENTATION_POSITION CodecR_EvtAcxStreamAudioEngineRetrievePresentationPosition;
NTSTATUS
CodecR_EvtAcxStreamAudioEngineRetrievePresentationPosition(
_In_ ACXSTREAMAUDIOENGINE StreamAudioEngine,
_Out_ PULONGLONG PositionInBlocks,
_Out_ PULONGLONG QPCPosition
)
{
NTSTATUS status = STATUS_INVALID_PARAMETER;
ACXSTREAM stream;
PCODEC_STREAM_CONTEXT ctx;
CRenderStreamEngine * streamEngine = NULL;
PAGED_CODE();
stream = AcxStreamAudioEngineGetStream(StreamAudioEngine);
if (stream)
{
ctx = GetCodecStreamContext(stream);
streamEngine = static_cast<CRenderStreamEngine*>(ctx->StreamEngine);
status = streamEngine->GetPresentationPosition(PositionInBlocks, QPCPosition);
}
return status;
}
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.