Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The AcxPeakMeterCreate function is used to create an ACX peakmeter object that that will be associated with a circuit object parent.
Syntax
NTSTATUS AcxPeakMeterCreate(
ACXOBJECT Object,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_PEAKMETER_CONFIG Config,
ACXPEAKMETER *PeakMeter
);
Parameters
Object
A WDFDEVICE object (described in Summary of Framework Objects) that will be associated with the circuit.
Attributes
Additional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various values and to associate the peakmeter object with the parent circuit object.
Config
An initialized ACX_PEAKMETER_CONFIG structure that describes the configuration of the audio level peakmeter.
PeakMeter
A pointer to a location that receives the handle to the newly created ACXPEAKMETER object. For more information about ACX objects, see Summary of ACX Objects.
Return value
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.
WDF_OBJECT_ATTRIBUTES attributes;
ACX_PEAKMETER_CALLBACKS peakmeterCallbacks;
ACX_PEAKMETER_CONFIG peakmeterCfg;
ACXPEAKMETER peakmeterElement;
CODEC_PEAKMETER_ELEMENT_CONTEXT*peakmeterCtx;
ACX_PEAKMETER_CALLBACKS_INIT(&peakmeterCallbacks);
peakmeterCallbacks.EvtAcxPeakMeterRetrieveLevel = CodecR_EvtPeakMeterRetrieveLevelCallback;
ACX_PEAKMETER_CONFIG_INIT(&peakmeterCfg);
peakmeterCfg.ChannelsCount = MAX_CHANNELS;
peakmeterCfg.Minimum = PEAKMETER_MINIMUM;
peakmeterCfg.Maximum = PEAKMETER_MAXIMUM;
peakmeterCfg.SteppingDelta = PEAKMETER_STEPPING_DELTA;
peakmeterCfg.Callbacks = &peakmeterCallbacks;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_PEAKMETER_ELEMENT_CONTEXT);
attributes.ParentObject = Circuit;
status = AcxPeakMeterCreate(Circuit, &attributes, &peakmeterCfg, &peakmeterElement);
ACX requirements
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.
Requirements
| Requirement | Value |
|---|---|
| Header | acxelements.h |
| IRQL | PASSIVE_LEVEL |