Agora Java API Reference for Android
Public Member Functions | List of all members
agora::rtc::IAudioDeviceCollection Class Referenceabstract

#include <IAgoraRtcEngine.h>

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
 

Detailed Description

The IAudioDeviceCollection class.

Member Function Documentation

◆ getCount()

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

Gets the total number of the playback or recording devices.

Call enumeratePlaybackDevices first, and then call this method to return the number of the audio playback devices.

Returns
  • The number of the audio devices, if the method call succeeds.
  • < 0, if the method call fails.

◆ getDevice()

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

Gets the information of a specified audio device.

Parameters
indexAn input parameter that specifies the audio device.
deviceNameAn output parameter that indicates the device name.
deviceIdAn output parameter that indicates the 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
deviceIdThe device ID.
Returns
  • 0: Success.
  • < 0: Failure.

◆ setApplicationVolume()

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

Sets the volume of the app.

Parameters
volumeThe volume of the app. The value range is [0, 255].
Returns
  • 0: Success.
  • < 0: Failure.

◆ getApplicationVolume()

virtual int agora::rtc::IAudioDeviceCollection::getApplicationVolume ( int &  volume)
pure virtual

Gets the volume of the app.

Parameters
volumeThe volume of the app. The value range is [0, 255]
Returns
  • 0: Success.
  • < 0: Failure.

◆ setApplicationMute()

virtual int agora::rtc::IAudioDeviceCollection::setApplicationMute ( bool  mute)
pure virtual

Mutes or unmutes the app.

Parameters
muteDetermines whether to mute the app:
  • true: Mute the app.
  • false: Unmute the app.
Returns
  • 0: Success.
  • < 0: Failure.

◆ isApplicationMute()

virtual int agora::rtc::IAudioDeviceCollection::isApplicationMute ( bool &  mute)
pure virtual

Gets the mute state of the app.

Parameters
muteA reference to the mute state of the app:
  • true: The app is muted.
  • false: The app is not muted.
Returns
  • 0: Success.
  • < 0: Failure.

◆ release()

virtual void agora::rtc::IAudioDeviceCollection::release ( )
pure virtual

Releases all IAudioDeviceCollection resources.