#include <IAgoraRtcEngine.h>
Audio device collection methods.
The IAudioDeviceCollection interface class gets device-related information.
◆ ~IAudioDeviceCollection()
virtual agora::rtc::IAudioDeviceCollection::~IAudioDeviceCollection |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ getCount()
virtual int agora::rtc::IAudioDeviceCollection::getCount |
( |
| ) |
|
|
pure virtual |
Gets the total number of audio playback or audio capturing devices (for macOS and Windows only).
- Note
- You must first call the enumeratePlaybackDevices or enumerateRecordingDevices method before calling this method to return the number of audio playback or audio capturing devices.
- Returns
- Number of audio playback or audio capturing devices.
◆ getDevice()
virtual int agora::rtc::IAudioDeviceCollection::getDevice |
( |
int |
index, |
|
|
char |
deviceName[MAX_DEVICE_ID_LENGTH], |
|
|
char |
deviceId[MAX_DEVICE_ID_LENGTH] |
|
) |
| |
|
pure virtual |
Gets a specified piece of information about an indexed audio device (for macOS and Windows only).
- Parameters
-
index | The specified index that must be less than the return value of getCount. |
deviceName | Pointer to the audio device name. |
deviceId | Pointer to the audio device ID. |
- Returns
- 0: Success.
- < 0: Failure.
◆ setDevice()
virtual int agora::rtc::IAudioDeviceCollection::setDevice |
( |
const char |
deviceId[MAX_DEVICE_ID_LENGTH] | ) |
|
|
pure virtual |
Specifies a device with the device ID (for macOS and Windows only).
- Parameters
-
deviceId | Pointer to the device ID of the device. |
- Returns
- 0: Success.
- < 0: Failure.
◆ getDefaultDevice()
virtual int agora::rtc::IAudioDeviceCollection::getDefaultDevice |
( |
char |
deviceName[MAX_DEVICE_ID_LENGTH], |
|
|
char |
deviceId[MAX_DEVICE_ID_LENGTH] |
|
) |
| |
|
pure virtual |
Gets the default audio device of the system (for macOS and Windows only).
- Since
- v3.6.0
- Parameters
-
deviceName | The name of the system default audio device. |
deviceId | The device ID of the the system default audio device. |
- Returns
- 0: Success.
- < 0: Failure.
◆ setApplicationVolume()
virtual int agora::rtc::IAudioDeviceCollection::setApplicationVolume |
( |
int |
volume | ) |
|
|
pure virtual |
Sets the volume of the application (for macOS and Windows only).
- Parameters
-
volume | Application volume. The value ranges between 0 (lowest volume) and 255 (highest volume). |
- Returns
- 0: Success.
- < 0: Failure.
◆ getApplicationVolume()
virtual int agora::rtc::IAudioDeviceCollection::getApplicationVolume |
( |
int & |
volume | ) |
|
|
pure virtual |
Gets the volume of the application (for macOS and Windows only).
- Parameters
-
volume | Pointer to the application volume. The volume value ranges between 0 (lowest volume) and 255 (highest volume). |
- Returns
- 0: Success.
- < 0: Failure.
◆ setApplicationMute()
virtual int agora::rtc::IAudioDeviceCollection::setApplicationMute |
( |
bool |
mute | ) |
|
|
pure virtual |
Mutes the application (for macOS and Windows only).
- Parameters
-
mute | Sets whether to mute/unmute the application:
- true: Mute the application.
- false: Unmute the application.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ isApplicationMute()
virtual int agora::rtc::IAudioDeviceCollection::isApplicationMute |
( |
bool & |
mute | ) |
|
|
pure virtual |
Gets the mute state of the application (for macOS and Windows only).
- Parameters
-
mute | Pointer to whether the application is muted/unmuted.
- true: The application is muted.
- false: The application is not muted.
|
- Returns
- 0: Success.
- < 0: Failure.
◆ release()
virtual void agora::rtc::IAudioDeviceCollection::release |
( |
| ) |
|
|
pure virtual |