Agora Server Gateway SDK C++ API Reference
Public Types | Public Member Functions | List of all members
agora::rtc::IAudioTrack Class Referenceabstract

#include <NGIAgoraAudioTrack.h>

Public Types

enum  AudioFilterPosition {
  RecordingLocalPlayback , PostAudioProcessing , RemoteUserPlayback , PcmSource ,
  PcmSourceSending , PcmSourceLocalPlayback , RemoteMixedPlayback
}
 

Public Member Functions

virtual bool addAudioSink (agora_refptr< IAudioSinkBase > sink, const AudioSinkWants &wants, aosl_ref_t ares=AOSL_REF_INVALID)=0
 
virtual bool removeAudioSink (agora_refptr< IAudioSinkBase > sink, aosl_ref_t ares=AOSL_REF_INVALID)=0
 

Detailed Description

The IAudioTrack class.

Member Enumeration Documentation

◆ AudioFilterPosition

The position of the audio filter in audio frame.

Enumerator
RecordingLocalPlayback 

The audio of local playback.

PostAudioProcessing 

The audio after post-processing.

RemoteUserPlayback 

The audio of remote users before mixing.

PcmSource 

PCM audio source.

PcmSourceSending 

PCM audio sink.

PcmSourceLocalPlayback 

PCM local playback.

RemoteMixedPlayback 

The audio of remote users after mixing.

Member Function Documentation

◆ addAudioSink()

virtual bool agora::rtc::IAudioTrack::addAudioSink ( agora_refptr< IAudioSinkBase sink,
const AudioSinkWants wants,
aosl_ref_t  ares = AOSL_REF_INVALID 
)
pure virtual

Adds an audio sink to get PCM data from the audio track.

Parameters
sinkThe pointer to the audio sink. See IAudioSinkBase.
wantsThe properties an audio frame should have when it is delivered to the sink. See AudioSinkWants.
aresThis parameter is used for the SDK lifecycle protection. Fill in the default value.
Returns
  • true: Success.
  • false: Failure.

◆ removeAudioSink()

virtual bool agora::rtc::IAudioTrack::removeAudioSink ( agora_refptr< IAudioSinkBase sink,
aosl_ref_t  ares = AOSL_REF_INVALID 
)
pure virtual

Removes an audio sink.

Parameters
sinkThe pointer to the audio sink to be removed. See IAudioSinkBase.
aresThis parameter is used for the SDK lifecycle protection. Fill in the default value.
Returns
  • true: Success.
  • false: Failure.

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