// acxelements.h
EVT_ACX_PEAKMETER_RETRIEVE_LEVEL EvtAcxPeakmeterRetrieveLevel;
NTSTATUS EvtAcxPeakmeterRetrieveLevel(
ACXPEAKMETER PeakMeter,
ULONG Channel,
LONG *Level
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The EVT_ACX_PEAKMETER_RETRIEVE_LEVEL callback function is implemented by the driver and is called when the level of a specified channel on a peakmeter node is requested.
PeakMeterAn existing, initialized, ACXPEAKMETER object. For more information about ACX objects, see Summary of ACX Objects.
ChannelA ULONG referring to a channel on the specified peakmeter node. If this value is -1, then it refers to the master channel which sets the level for all channels on the peakmeter node.
LevelA LONG value that indicates the maximum audio signal level that occurred for the specified channel on the peakmeter node since the last time the peakmeter node was reset.
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.
typedef struct _CODEC_PEAKMETER_ELEMENT_CONTEXT {
LONG PeakMeterLevel[MAX_CHANNELS];
} CODEC_PEAKMETER_ELEMENT_CONTEXT, *PCODEC_PEAKMETER_ELEMENT_CONTEXT;
WDF_DECLARE_CONTEXT_TYPE_WITH_NAME(CODEC_PEAKMETER_ELEMENT_CONTEXT, GetCodecPeakMeterElementContext)
EVT_ACX_PEAKMETER_RETRIEVE_LEVEL CodecR_EvtPeakMeterRetrieveLevelCallback;
NTSTATUS
NTAPI
CodecR_EvtPeakMeterRetrieveLevelCallback(
_In_ ACXPEAKMETER PeakMeter,
_In_ ULONG Channel,
_Out_ LONG * PeakMeterLevel
)
{
PAGED_CODE();
ASSERT(PeakMeter);
PCODEC_PEAKMETER_ELEMENT_CONTEXT peakmeterCtx = GetCodecPeakMeterElementContext(PeakMeter);
ASSERT(peakmeterCtx);
if (Channel == ALL_CHANNELS_ID)
{
Channel = 0;
}
*PeakMeterLevel = peakmeterCtx->PeakMeterLevel[Channel];
return STATUS_SUCCESS;
}
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.