Skip to content

Latest commit

 

History

History
104 lines (78 loc) · 3.27 KB

nf-acxelements-acxaudioenginecreate.md

File metadata and controls

104 lines (78 loc) · 3.27 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
NF:acxelements.AcxAudioEngineCreate
audio
AcxAudioEngineCreate
12/15/2022
Windows
The AcxAudioEngineCreate function is used to create an audio engine that that will be associated with a circuit WDFDEVICE device object parent.
false
function
acxelements.h
PASSIVE_LEVEL
apiref
HeaderDef
acxelements.h
AcxAudioEngineCreate
AcxAudioEngineCreate
acxelements/AcxAudioEngineCreate
c++

-description

The AcxAudioEngineCreate function is used to create an audio engine that that will be associated with a circuit WDFDEVICE device object parent.

-parameters

-param Object

A WDFDEVICE object (described in Summary of Framework Objects) that will be associated with the circuit.

-param Attributes

A WDF_OBJECT_ATTRIBUTES structure that is used to associate the AcxAudioEngine with the parent circuit object. Note that additional WDF attributes such as WDF_EXECUTION_LEVEL or WDF_SYNCHRONIZATION_SCOPE, should not be set using the Attributes parameter as they are a managed by ACX.

-param Config

An initialized ACX_AUDIOENGINE_CONFIG structure that describes the configuration of the audio engine.

-param AudioEngine

A pointer to a location that receives the handle to the new ACXAUDIOENGINE object that is used in a render circuit, to represent a DSP. For more information about ACX objects, see Summary of ACX Objects.

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

    NTSTATUS                        status;
    WDF_OBJECT_ATTRIBUTES           attributes;
    ACX_AUDIOENGINE_CONFIG          audioEngineCfg;

    ACX_AUDIOENGINE_CONFIG_INIT(&audioEngineCfg);

    audioEngineCfg.HostPin = Pins[HostPin];
    audioEngineCfg.OffloadPin = Pins[OffloadPin];
    audioEngineCfg.LoopbackPin = Pins[LoopbackPin];
    audioEngineCfg.VolumeElement = volumeElement;
    audioEngineCfg.MuteElement = muteElement;
    audioEngineCfg.PeakMeterElement = peakmeterElement;
    audioEngineCfg.Callbacks = &audioEngineCallbacks;

    WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_ENGINE_CONTEXT);
    attributes.ParentObject = Circuit;

    status = AcxAudioEngineCreate(Circuit, &attributes, &audioEngineCfg, AudioEngine);

ACX requirements

Minimum ACX version: 1.0

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

-see-also