Copyright © 2006-2018 MultiMedia Soft

ASIO.DeviceGetInputIndex method

Previous pageReturn to chapter overviewNext page

Remarks

 

Given the zero-index of an ASIO device, obtains the zero-based index of the corresponding input device inside the list of available generic input devices.

 

The list of generic input devices, which may include both DirectSound and ASIO devices, can be enumerated through the GetInputDevicesCount and GetInputDeviceDesc methods. The list of ASIO devices, which includes ASIO devices only, can be enumerated through the ASIO.DeviceGetCount and ASIO.DeviceGetDesc methods.

 

When the InitDriversType method has been called with the nDriverType parameter set to DRIVER_TYPE_ASIO or DRIVER_TYPE_BOTH_ASIO_FIRST, indexes of generic input devices will always match indexes of ASIO devices so the use of this method could be avoided.

 

When the InitDriversType method has been called with the nDriverType parameter set to DRIVER_TYPE_BOTH_DS_FIRST, DirectSound input devices will be listed first inside the list of available generic input devices so indexes of generic input devices will not match indexes of ASIO devices: in this case this specific method allows matching a generic input device to a specific ASIO device.

 

If you know the zero-based index of an input device inside the list of available generic input devices and you need to know its zero-based index inside the list of ASIO devices, you can use the ASIO.DeviceGetIndexFromInput method.

 

For further details about the use of ASIO drivers see the ASIOMan class and the How to manage ASIO drivers tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function DeviceGetInputIndex (

nDeviceIndex as Int16

) as Int16


 

[C#]

public Int16 DeviceGetInputIndex (

Int16 nDeviceIndex

);


 

[C++]

public: Int16 DeviceGetInputIndex (

Int16 nDeviceIndex

);


 

Parameter

Description

 

 

nDeviceIndex

Number representing the zero-based index of the ASIO device.

This index is related to available ASIO devices so it must be the related to the enumeration performed through the ASIO.DeviceGetCount and ASIO.DeviceGetDesc methods: it must not be confused with indexes related to generic input devices enumerated through the GetInputDevicesCount and   GetInputDeviceDesc methods which may contain both DirectSound and ASIO devices.

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

>= 0

The zero-based index of the ASIO device inside the list of available ASIO devices