Agora C++ API Reference for All Platforms

Loading...
Searching...
No Matches
Public Member Functions | List of all members
agora::rtc::IAudioMixerSource Class Referenceabstract

`#include <NGIAgoraAudioMixerSource.h>`

Inherits agora::RefCountInterface.

## Public Member Functions
virtual int | addAudioTrack (agora_refptr< IAudioTrack > track, bool is_remote, aosl_ref_t ares=AOSL_REF_INVALID)=0
virtual int | removeAudioTrack (agora_refptr< IAudioTrack > track, bool is_remote, aosl_ref_t ares=AOSL_REF_INVALID)=0
Public Member Functions inherited from agora::RefCountInterface
virtual void | AddRef () const =0
virtual RefCountReleaseStatus | Release () const =0
virtual bool | HasOneRef () const =0

## Additional Inherited Members
Protected Member Functions inherited from agora::RefCountInterface
virtual | ~RefCountInterface ()

## Detailed Description

The IAudioMixerSource class abstracts a multi-in-multi-out audio source which receives audio streams from multiple local or remote audio tracks and generate mixed audio stream in user defined output format. When only one audio track is added to the mixer, it simply forwards the incoming audio frames to its sinks.

## Member Function Documentation

## ◆ addAudioTrack()

virtual int agora::rtc::IAudioMixerSource::addAudioTrack | ( | agora_refptr< IAudioTrack > | track,
|  | bool | is_remote,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Add audio track for mixing.

Parameters

  id | The unique id of the stream.
  track | The instance of the audio track that you want mixer to receive its audio stream.

Returns
  0 - Success <0 - Failure

## ◆ removeAudioTrack()

virtual int agora::rtc::IAudioMixerSource::removeAudioTrack | ( | agora_refptr< IAudioTrack > | track,
|  | bool | is_remote,
|  | aosl_ref_t | ares = AOSL_REF_INVALID )
| pure virtual

Remove the audio track.

Parameters

  track | The instance of the audio track that you want to remove from the mixer.

Returns
  0 - Success <0 - Failure