Public Attributes

AUDIO_FRAME_TYPE type
 
int samples
 
int bytesPerSample
 
int channels
 
int samplesPerSec
 
byte [] buffer
 
long renderTimeMs
 
int avsync_type
 

Detailed Description

Definition of AudioFrame.

Member Data Documentation

◆ type

AUDIO_FRAME_TYPE agora_gaming_rtc.AudioFrame.type

The type of the audio frame. See AUDIO_FRAME_TYPE

◆ samples

int agora_gaming_rtc.AudioFrame.samples

The number of samples per channel in the audio frame.

◆ bytesPerSample

int agora_gaming_rtc.AudioFrame.bytesPerSample

The number of bytes per audio sample, which is usually 16-bit (2-byte).

◆ channels

int agora_gaming_rtc.AudioFrame.channels

The number of audio channels.

  • 1: Mono
  • 2: Stereo (the data is interleaved)

◆ samplesPerSec

int agora_gaming_rtc.AudioFrame.samplesPerSec

The sample rate.

◆ buffer

byte [] agora_gaming_rtc.AudioFrame.buffer

The data buffer of the audio frame. When the audio frame uses a stereo channel, the data buffer is interleaved. The size of the data buffer is as follows: buffer = samples × channels × bytesPerSample.

◆ renderTimeMs

long agora_gaming_rtc.AudioFrame.renderTimeMs

The timestamp of the external audio frame. You can use this parameter for the following purposes:

  • Restore the order of the captured audio frame.
  • Synchronize audio and video frames in video-related scenarios, including where external video sources are used.

◆ avsync_type

int agora_gaming_rtc.AudioFrame.avsync_type

Reserved for future use.