Server Gateway SDK v3.8.202.20 for Linux C++
Classes | Public Member Functions | Protected Member Functions | List of all members
agora::rtc::ILocalAudioTrack Class Referenceabstract

#include <NGIAgoraAudioTrack.h>


struct  LocalAudioTrackStats

Public Member Functions

virtual void setEnabled (bool enable)=0
virtual bool isEnabled () const =0
virtual LOCAL_AUDIO_STREAM_STATE getState ()=0
virtual LocalAudioTrackStats GetStats ()=0
virtual int adjustPublishVolume (int volume)=0
virtual int getPublishVolume (int *volume)=0
- Public Member Functions inherited from agora::rtc::IAudioTrack
virtual bool addAudioSink (agora_refptr< IAudioSinkBase > sink, const AudioSinkWants &wants)=0
virtual bool removeAudioSink (agora_refptr< IAudioSinkBase > sink)=0

Protected Member Functions

 ~ILocalAudioTrack ()

Additional Inherited Members

- Public Types inherited from agora::rtc::IAudioTrack
enum  AudioFilterPosition {
  RecordingLocalPlayback , PostAudioProcessing , PcmSource , PcmSourceSending ,

Detailed Description

ILocalAudioTrack is the base class for local audio tracks, providing main methods of local audio tracks.

Constructor & Destructor Documentation

◆ ~ILocalAudioTrack()

agora::rtc::ILocalAudioTrack::~ILocalAudioTrack ( )

Member Function Documentation

◆ adjustPublishVolume()

virtual int agora::rtc::ILocalAudioTrack::adjustPublishVolume ( int  volume)
pure virtual

Adjusts the audio volume for publishing.

volumeThe volume for publishing. The value ranges between 0 and 100 (default).
  • 0: Success.
  • < 0: Failure.

◆ getPublishVolume()

virtual int agora::rtc::ILocalAudioTrack::getPublishVolume ( int *  volume)
pure virtual

Gets the current volume for publishing.

volumeA pointer to the publishing volume.
  • 0: Success.
  • < 0: Failure.

◆ getState()

virtual LOCAL_AUDIO_STREAM_STATE agora::rtc::ILocalAudioTrack::getState ( )
pure virtual

Gets the state of the local audio.

The state of the local audio: LOCAL_AUDIO_STREAM_STATE: Success.

◆ GetStats()

virtual LocalAudioTrackStats agora::rtc::ILocalAudioTrack::GetStats ( )
pure virtual

Gets the statistics of the local audio track: LocalAudioTrackStats.

The statistics of the local audio: LocalAudioTrackStats: Success.

◆ isEnabled()

virtual bool agora::rtc::ILocalAudioTrack::isEnabled ( ) const
pure virtual

Gets whether the local audio track is enabled.

Whether the local audio track is enabled:
  • true: The local track is enabled.
  • false: The local track is disabled.

◆ setEnabled()

virtual void agora::rtc::ILocalAudioTrack::setEnabled ( bool  enable)
pure virtual

Enables or disables the local audio track.

Once the local audio is enabled, the SDK allows for local audio capturing, processing, and encoding.

enableWhether to enable the audio track:
  • true: Enable the local audio track.
  • false: Disable the local audio track.

The documentation for this class was generated from the following file: