ASIO.DeviceGetIndexFromOutput method |
|
Remarks
Given the zero-index of a generic output device, obtains the zero-based index of the corresponding ASIO device inside the list of available ASIO devices.
The list of generic output devices, which may include both DirectSound and ASIO devices, can be enumerated through the GetOutputDevicesCount and GetOutputDeviceDescmethods. 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 generic output device to a specific ASIO device.
If you know the zero-based index of an ASIO device inside the list of available ASIO devices and you need to know its zero-based index inside the list of generic output devices, you can use the ASIO.DeviceGetOutputIndex 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 DeviceGetIndexFromOutput ( nOutputIndex as Int16 ) as Int16 |
[C#] public Int16 DeviceGetIndexFromOutput ( Int16 nOutputIndex ); |
[C++] public: Int16 DeviceGetIndexFromOutput ( Int16 nOutputIndex ); |
Parameter |
Description |
|
|
nOutputIndex |
Zero-based index of the output device as enumerated by the combination of the GetOutputDevicesCount and GetOutputDeviceDesc methods. |
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 |