// acxelements.h
NTSTATUS AcxStreamAudioEngineCreate(
ACXSTREAM Stream,
ACXAUDIOENGINE AudioEngine,
PWDF_OBJECT_ATTRIBUTES Attributes,
PACX_STREAMAUDIOENGINE_CONFIG Config,
ACXSTREAMAUDIOENGINE *StreamAudioEngine
);
View the official Windows Driver Kit DDI referenceNo description available.
The AcxStreamAudioEngineCreate function is used to create an ACX stream audio engine object that will be associated with an ACX stream object parent. For more information about ACX objects, see Summary of ACX Objects.
StreamAn ACXSTREAM object that represents an audio stream on a specific circuit's hardware. For more information about ACX objects, see Summary of ACX Objects.
AudioEngineAn ACXAUDIOENGINE object that is used in a render circuit, to represent a DSP. For more information about ACX objects, see Summary of ACX Objects.
AttributesAdditional Attributes defined using a WDF_OBJECT_ATTRIBUTES structure that are used to set various values and to associate the stream audio engine with the parent stream object.
ConfigAn initialized ACX_STREAMAUDIOENGINE_CONFIG structure that describes the configuration of the stream audio engine.
StreamAudioEngineA pointer to a location that receives the handle to the newly created ACXSTREAMAUDIOENGINE object. For more information about ACX objects, see Summary of ACX Objects.
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.
NTSTATUS status;
WDF_OBJECT_ATTRIBUTES attributes;
ACXSTREAM stream;
ACXELEMENT elements[2] = {0};
ACX_STREAMAUDIOENGINE_CONFIG audioEngineCfg;
ACX_STREAMAUDIOENGINE_CONFIG_INIT(&audioEngineCfg);
audioEngineCfg.VolumeElement = volumeElement;
audioEngineCfg.MuteElement = muteElement;
audioEngineCfg.PeakMeterElement = peakmeterElement;
audioEngineCfg.Callbacks = &streamAudioEngineCallbacks;
WDF_OBJECT_ATTRIBUTES_INIT_CONTEXT_TYPE(&attributes, CODEC_STREAMAUDIOENGINE_CONTEXT);
attributes.ParentObject = stream;
status = AcxStreamAudioEngineCreate(stream, circuitCtx->AudioEngineElement, &attributes, &audioEngineCfg, (ACXSTREAMAUDIOENGINE*)&elements[0]);
Minimum ACX version: 1.0
For more information about ACX versions, see ACX version overview.