Skip to content

Latest commit

 

History

History
113 lines (86 loc) · 3.05 KB

nc-acxelements-evt_acx_peakmeter_retrieve_level.md

File metadata and controls

113 lines (86 loc) · 3.05 KB
UID tech.root title ms.date targetos description prerelease req.assembly req.construct-type req.ddi-compliance req.dll req.header req.idl req.include-header req.irql req.kmdf-ver req.lib req.max-support req.namespace req.redist req.target-min-winverclnt req.target-min-winversvr req.target-type req.type-library req.umdf-ver req.unicode-ansi topic_type api_type api_location api_name f1_keywords dev_langs
NC:acxelements.EVT_ACX_PEAKMETER_RETRIEVE_LEVEL
audio
EVT_ACX_PEAKMETER_RETRIEVE_LEVEL
12/15/2022
Windows
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.
false
function
acxelements.h
PASSIVE_LEVEL
apiref
LibDef
acxelements.h
EVT_ACX_PEAKMETER_RETRIEVE_LEVEL
EVT_ACX_PEAKMETER_RETRIEVE_LEVEL
acxelements/EVT_ACX_PEAKMETER_RETRIEVE_LEVEL
c++

-description

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.

-parameters

-param PeakMeter

An existing, initialized, ACXPEAKMETER object. For more information about ACX objects, see Summary of ACX Objects.

-param Channel

A 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.

-param Level

A 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

Returns STATUS_SUCCESS if the call was successful. Otherwise, it returns an appropriate error code. For more information, see Using NTSTATUS Values.

-remarks

Example

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;
}

ACX requirements

Minimum ACX version: 1.0

For more information about ACX versions, see ACX version overview.

-see-also