Agora RTC Objective-C API Reference Refactor

Public Member Functions
IAudioMixerSource Class Referenceabstract

Inherits 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

## 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 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 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

## ◆ AddRef()

virtual void AddRef | ( |  | ) | const
| pure virtual inherited

## ◆ Release()

virtual RefCountReleaseStatus Release | ( |  | ) | const
| pure virtual inherited

## ◆ HasOneRef()

virtual bool HasOneRef | ( |  | ) | const
| pure virtual inherited