Copyright © 2008-2019 MultiMedia Soft

WASAPI.DeviceGetDesc method

Previous pageReturn to chapter overviewNext page

Remarks

 

Retrieves the friendly description of the requested WASAPI device. This method is useful when you have to fill a combo box with the friendly names of available WASAPI devices.

The total number of available WASAPI devices can be obtained using the WASAPI.DeviceGetCount method.

 

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

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

 

 

Syntax

 

[Visual Basic]

control.WASAPI.DeviceGetDesc (

nDeviceIndex as Integer,

nDeviceType as enumWasapiDeviceTypes

) as String


 

[C++]

LPCTSTR control.WASAPI.DeviceGetDesc (

short nDeviceIndex,

short nDeviceType

);


 

Parameter

Description

 

 

nDeviceIndex

Number representing the zero-based index of the WASAPI device whose friendly name must be retrieved

nDeviceType

The type of device.

Supported values are the following:

Mnemonic Value

Value

Meaning

WASAPI_DEVICE_TYPE_RENDER

0

Audio rendering device.

WASAPI_DEVICE_TYPE_CAPTURE

1

Audio capture device.

WASAPI_DEVICE_TYPE_LOOPBACK

2

Audio loopback device.

 

 

 

Return value

 

Value

Meaning

 

 

Empty string

The value of the nDeviceIndex parameter was out of range. Use the value returned by the WASAPI.DeviceGetCount method in order to know how many WASAPI devices are currently installed inside the system.

Valid string

The string containing the friendly description of the requested device.