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
- This method applies to macOS only.
- You need to call enumeratePlaybackDevices or enumerateRecordingDevices to get the device list before calling this method.
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.