Agora Java API Reference for Android

Public Member Functions | List of all members
agora::media::IAudioFrameObserver Class Referenceabstract

`#include <AgoraMediaBase.h>`

Inheritance diagram for agora::media::IAudioFrameObserver:

## Public Member Functions
virtual bool | onPlaybackAudioFrameBeforeMixing (const char *channelId, rtc::uid_t uid, AudioFrame &audioFrame)=0
virtual bool | onPlaybackAudioFrameBeforeMixing (const char *channelId, base::user_id_t userId, AudioFrame &audioFrame)
Public Member Functions inherited from agora::media::IAudioFrameObserverBase
virtual bool | onRecordAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
virtual bool | onPlaybackAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
virtual bool | onMixedAudioFrame (const char *channelId, AudioFrame &audioFrame)=0
virtual bool | onEarMonitoringAudioFrame (AudioFrame &audioFrame)=0
virtual bool | onPlaybackAudioFrameBeforeMixing (const char *channelId, base::user_id_t userId, AudioFrame &audioFrame)
virtual int | getObservedAudioFramePosition ()=0
virtual AudioParams | getPlaybackAudioParams ()=0
virtual AudioParams | getRecordAudioParams ()=0
virtual AudioParams | getMixedAudioParams ()=0
virtual AudioParams | getEarMonitoringAudioParams ()=0

## Additional Inherited Members
Public Types inherited from agora::media::IAudioFrameObserverBase
enum | AUDIO_FRAME_TYPE { FRAME_TYPE_PCM16 = 0 }
enum | { MAX_HANDLE_TIME_CNT = 10 }
enum | AUDIO_FRAME_POSITION { AUDIO_FRAME_POSITION_NONE = 0x0000, AUDIO_FRAME_POSITION_PLAYBACK = 0x0001, AUDIO_FRAME_POSITION_RECORD = 0x0002, AUDIO_FRAME_POSITION_MIXED = 0x0004, AUDIO_FRAME_POSITION_BEFORE_MIXING = 0x0008, AUDIO_FRAME_POSITION_EAR_MONITORING = 0x0010 }

## Detailed Description

The IAudioFrameObserver class.

## Member Function Documentation

## ◆ onPlaybackAudioFrameBeforeMixing() [1/2]

virtual bool agora::media::IAudioFrameObserver::onPlaybackAudioFrameBeforeMixing | ( | const char * | channelId,
|  | rtc::uid_t | uid,
|  | AudioFrame & | audioFrame
| ) |  |
| pure virtual

Occurs when the before-mixing playback audio frame is received.

Parameters

  channelId | The channel name
  uid | ID of the remote user.
  audioFrame | The reference to the audio frame: AudioFrame.

Returns
  - true: The before-mixing playback audio frame is valid and is encoded and sent.
  - false: The before-mixing playback audio frame is invalid and is not encoded or sent.

## ◆ onPlaybackAudioFrameBeforeMixing() [2/2]

virtual bool agora::media::IAudioFrameObserverBase::onPlaybackAudioFrameBeforeMixing

Occurs when the before-mixing playback audio frame is received.

Parameters

  channelId | The channel name
  userId | ID of the remote user.
  audioFrame | The reference to the audio frame: AudioFrame.

Returns
  - true: The before-mixing playback audio frame is valid and is encoded and sent.
  - false: The before-mixing playback audio frame is invalid and is not encoded or sent.