Public Member Functions

virtual int getCount ()=0
 
virtual int getDevice (int index, char deviceName[MAX_DEVICE_ID_LENGTH], char deviceId[MAX_DEVICE_ID_LENGTH])=0
 
virtual int setDevice (const char deviceId[MAX_DEVICE_ID_LENGTH])=0
 
virtual int setApplicationVolume (int volume)=0
 
virtual int getApplicationVolume (int &volume)=0
 
virtual int setApplicationMute (bool mute)=0
 
virtual int isApplicationMute (bool &mute)=0
 
virtual void release ()=0
 

Protected Member Functions

virtual ~IAudioDeviceCollection ()
 

Detailed Description

Audio device collection methods.

The IAudioDeviceCollection interface class retrieves device-related information.

Constructor & Destructor Documentation

◆ ~IAudioDeviceCollection()

virtual agora::rtc::IAudioDeviceCollection::~IAudioDeviceCollection ( )
inlineprotectedvirtual

Member Function Documentation

◆ getCount()

virtual int agora::rtc::IAudioDeviceCollection::getCount ( )
pure virtual

Retrieves the total number of audio playback or audio recording devices.

Note
You must first call the enumeratePlaybackDevices or enumerateRecordingDevices method before calling this method to return the number of audio playback or audio recording devices.
Returns
Number of audio playback or audio recording devices.

◆ getDevice()

virtual int agora::rtc::IAudioDeviceCollection::getDevice ( int  index,
char  deviceName[MAX_DEVICE_ID_LENGTH],
char  deviceId[MAX_DEVICE_ID_LENGTH] 
)
pure virtual

Retrieves a specified piece of information about an indexed audio device.

Parameters
indexThe specified index that must be less than the return value of getCount.
deviceNamePointer to the audio device name.
deviceIdPointer 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.

Parameters
deviceIdPointer to the device ID of the device.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setApplicationVolume()

virtual int agora::rtc::IAudioDeviceCollection::setApplicationVolume ( int  volume)
pure virtual

Sets the volume of the application.

Parameters
volumeApplication 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

Retrieves the volume of the application.

Parameters
volumePointer 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.

Parameters
muteSets 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.

Parameters
mutePointer 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

Releases all IAudioDeviceCollection resources.