Copyright © 2006-2018 MultiMedia Soft

WASAPI.ListenInputDeviceStart method

Previous pageReturn to chapter overviewNext page

Remarks

 

Attaches a given WASAPI capture device to a specific render device, allowing to emulate the "Listen to this device" option available inside the Windows control panel.

 

 

The effect of this method can be canceled through a call to the WASAPI.ListenInputDeviceStop method.

 

Both the given capture and render devices must have been previously started through one between the WASAPI.DeviceStartShared and WASAPI.DeviceStartExcusive methods.

 

This method is only intended for usage with Windows Vista and later versions.

For further details about the use of WASAPI see the WASAPIMan class and the How to manage audio flow through WASAPI tutorial

 

 

Syntax

 

[Visual Basic]

Public Function ListenInputDeviceStart (

nInputDeviceIndex as Int32,

nRenderDeviceIndex as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ListenInputDeviceStart (

Int32 nInputDeviceIndex,

Int32 nRenderDeviceIndex

);


 

[C++]

public: enumErrorCodes ListenInputDeviceStart (

Int32 nInputDeviceIndex,

Int32 nRenderDeviceIndex

);


 

 

Parameter

Description

 

 

nInputDeviceIndex

Number representing the zero-based index of the WASAPI capture device of interest. The total number of available WASAPI capture devices can be obtained using the WASAPI.DeviceGetCount method with the nDeviceType parameter set to WASAPI_DEVICE_TYPE_CAPTURE.

nRenderDeviceIndex

Number representing the zero-based index of the WASAPI render device of interest. The total number of available WASAPI render devices can be obtained using the WASAPI.DeviceGetCount method with the nDeviceType parameter set to WASAPI_DEVICE_TYPE_RENDER.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.ERR_NOERROR (0)

The method call was successful.