// audiosensors.h
EVT_AUDIO_SENSORS_START_SESSION EvtAudioSensorsStartSession;
NTSTATUS EvtAudioSensorsStartSession(
PVOID Context,
AUDIO_MODULE_ID ModuleId,
PAUDIO_ENDPOINT_CONFIG AudioRenderEndpointConfig,
PAUDIO_ENDPOINT_CONFIG AudioCaptureEndpointConfig,
PULONG SensorsSessionId
)
{...}
View the official Windows Driver Kit DDI referenceNo description available.
The EVT_AUDIO_SENSORS_START_SESSION callback function is implemented by the audio driver and is called by the audio sensors driver to start a new sensors session. This function configures audio endpoints for use in presence sensing scenarios.
ContextA pointer to the audio driver-supplied context that was provided when the interface was obtained.
ModuleIdAn AUDIO_MODULE_ID structure that identifies the target audio module for this session.
AudioRenderEndpointConfigAn optional pointer to an AUDIO_ENDPOINT_CONFIG structure that contains the audio render endpoint configuration details to be used for this session. This parameter can be NULL if no render endpoint configuration is needed.
AudioCaptureEndpointConfigAn optional pointer to an AUDIO_ENDPOINT_CONFIG structure that contains the audio capture endpoint configuration details to be used for this session. This parameter can be NULL if no capture endpoint configuration is needed.
SensorsSessionIdA pointer to a ULONG that receives a non-zero session identifier returned by the audio driver. This identifier is used in subsequent calls to identify this specific session.
Returns an NTSTATUS value. Return STATUS_SUCCESS if the operation succeeds. Otherwise, return an appropriate NTSTATUS error code.
The EVT_AUDIO_SENSORS_START_SESSION callback is called by the audio driver when it needs to start a sensor session for presence sensing operations. The session associates audio endpoints with sensor functionality, typically for ultrasound-based presence detection.
The SensorsSessionId returned by this function must be a non-zero value that uniquely identifies the session. This identifier is used in subsequent calls to EVT_AUDIO_SENSORS_STOP_SESSION and EVT_AUDIO_SENSORS_BUFFER functions.
Both AudioRenderEndpointConfig and AudioCaptureEndpointConfig are optional, allowing flexibility in configuring sessions that may only need one direction of audio flow.