AgoraAudioFrame Class Reference

Inherits from NSObject
Declared in AgoraObjects.h

Overview

The AgoraAudioFrame interface. (iOS only)

  samplesPerChannel

The number of samples per channel.

@property (assign, nonatomic) NSInteger samplesPerChannel

Declared In

AgoraObjects.h

  bytesPerSample

The number of bytes per audio sample. For example, each PCM audio sample usually takes up 16 bits (2 bytes).

@property (assign, nonatomic) NSInteger bytesPerSample

Declared In

AgoraObjects.h

  channels

The number of audio channels. If the channel uses stereo, the data is interleaved.

@property (assign, nonatomic) NSInteger channels

Discussion

  • 1: Mono.
  • 2: Stereo.

Declared In

AgoraObjects.h

  samplesPerSec

The sample rate.

@property (assign, nonatomic) NSInteger samplesPerSec

Declared In

AgoraObjects.h

  buffer

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

@property (assign, nonatomic) void *buffer

Declared In

AgoraObjects.h

  renderTimeMs

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

@property (assign, nonatomic) int64_t renderTimeMs

Discussion

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

Declared In

AgoraObjects.h

  avSyncType

Reserved for future use.

@property (assign, nonatomic) NSInteger avSyncType

Declared In

AgoraObjects.h