// acxelements.h
EVT_ACX_STREAMAUDIOENGINE_RETRIEVE_LINEAR_BUFFER_POSITION EvtAcxStreamaudioengineRetrieveLinearBufferPosition;
NTSTATUS EvtAcxStreamaudioengineRetrieveLinearBufferPosition(
ACXSTREAMAUDIOENGINE StreamAudioEngine,
PULONGLONG Position
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The EVT_ACX_STREAMAUDIOENGINE_RETRIEVE_LINEAR_BUFFER_POSITION callback is implemented by the driver and is called when the linear buffer position is requested for the specified stream audio engine.
StreamAudioEngineAn existing, initialized, ACXSTREAMAUDIOENGINE object. For more information about ACX objects, see Summary of ACX Objects.
PositionA ULONGLONG value that represents the number of bytes that the DMA has fetched from the audio buffer of the specified stream audio engine since the beginning of the stream.
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_LINEAR_BUFFER_POSITION CodecR_EvtAcxStreamAudioEngineRetrieveLinearBufferPosition;
NTSTATUS
CodecR_EvtAcxStreamAudioEngineRetrieveLinearBufferPosition(
_In_ ACXSTREAMAUDIOENGINE StreamAudioEngine,
_Out_ PULONGLONG Position
)
{
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->GetLinearBufferPosition(Position);
}
return status;
}
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.