Funzione AcxPeakMeterCreate (acxelements.h)
La funzione AcxPeakMeterCreate viene usata per creare un oggetto peakmeter ACX che verrà associato a un elemento padre dell'oggetto circuito.
NTSTATUS AcxPeakMeterCreate(
ACXOBJECT Object,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_PEAKMETER_CONFIG Config,
ACXPEAKMETER *PeakMeter
);
Object
Oggetto WDFDEVICE (descritto in Riepilogo degli oggetti framework) che verrà associato al circuito.
Attributes
Attributi aggiuntivi definiti utilizzando una struttura di WDF_OBJECT_ATTRIBUTES utilizzata per impostare vari valori e per associare l'oggetto peakmeter all'oggetto circuito padre.
Config
Struttura ACX_PEAKMETER_CONFIG inizializzata che descrive la configurazione del picco del livello audio.
PeakMeter
Puntatore a una posizione che riceve l'handle all'oggetto ACXPEAKMETER appena creato. Per altre informazioni sugli oggetti ACX, vedere Riepilogo degli oggetti ACX.
Restituisce STATUS_SUCCESS
se la chiamata ha avuto esito positivo. In caso contrario, restituisce un codice di errore appropriato. Per altre informazioni, vedere Uso di valori NTSTATUS.
Di seguito è riportato un esempio di utilizzo.
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);
versione minima di ACX: 1.0
Per altre informazioni sulle versioni di ACX, vedere panoramica della versione ACX.
Requisito | Valore |
---|---|
intestazione | acxelements.h |
IRQL | PASSIVE_LEVEL |