Copyright © 2001-2018 MultiMedia Soft

ASIO.DeviceGetOutputIndex method

Previous pageReturn to chapter overviewNext page

Remarks

 

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

 

The list of generic output devices, which may include both DirectSound and ASIO devices, can be enumerated through the GetOutputDevicesCount and GetOutputDeviceDesc 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 output 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 output devices will be listed first inside the list of available generic output devices so indexes of generic output devices will not match indexes of ASIO devices: in this case this specific method allows matching a specific ASIO device to a generic output device.

 

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

 

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

 

 

Syntax

 

[Visual Basic]

control.ASIO.DeviceGetOutputIndex (

nDeviceIndex as Integer

) as Integer


 

[C++]

short control.ASIO.DeviceGetOutputIndex (

short 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 output devices enumerated through the GetOutputDevicesCount and GetOutputDeviceDesc 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