getDevice [2/2]

Get the audio device information and device type by index.

virtual int getDevice(int index, char deviceName[MAX_DEVICE_ID_LENGTH], char deviceTypeName[MAX_DEVICE_ID_LENGTH],
                        char deviceId[MAX_DEVICE_ID_LENGTH]) = 0; 

Details

You can call this method to get the name, type and ID of a specified audio device.

Attention: This method is for macOS only.

Parameters

index
An input parameter. The index of the device.
deviceId
An output parameter. The device ID. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.
deviceName
An output parameter. The device name. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.
deviceTypeName
Output parameter; indicates the type of audio devices, such as built-in, USB and HDMI. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.

Returns

  • 0: Success.
  • < 0: Failure.