getDefaultDevice [2/2]

Get the system‘s default audio device and its type.

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

Details

Since
v4.3.1

Parameters

deviceName
Output parameter; the name of the system's default audio device. 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.
deviceId
Output parameter; the device ID of the system default audio device. The maximum length is MAX_DEVICE_ID_LENGTH_TYPE.

Returns

  • 0: Success.
  • < 0: Failure.