Agora RTC Objective-C API Reference  Refactor
Properties
AgoraAudioFrame Class Reference

Inherits <NSObject>.

Properties

NSInteger samplesPerChannel
 
NSInteger bytesPerSample
 
NSInteger channels
 
NSInteger samplesPerSec
 
void *_Nullable buffer
 
int64_t renderTimeMs
 
NSInteger avSyncType
 
uint32_t rtpTimestamp
 

Property Documentation

◆ samplesPerChannel

- (NSInteger) samplesPerChannel
readwritenonatomicassign

The number of samples per channel in the audio frame.

◆ bytesPerSample

- (NSInteger) bytesPerSample
readwritenonatomicassign

The number of bytes per sample. For PCM, this parameter is generally set to 16 bits (2 bytes).

◆ channels

- (NSInteger) channels
readwritenonatomicassign

The number of audio channels (the data are interleaved if it is stereo).

  • 1: Mono.
  • 2: Stereo.

◆ samplesPerSec

- (NSInteger) samplesPerSec
readwritenonatomicassign

The number of samples per channel in the audio frame.

◆ buffer

- (void* _Nullable) buffer
readwritenonatomicassign

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

- (int64_t) renderTimeMs
readwritenonatomicassign

The timestamp (ms) of the external audio frame. You can use this timestamp to restore the order of the captured audio frame, and synchronize audio and video frames in video scenarios, including scenarios where external video sources are used.

◆ presentationMs

- (int64_t) presentationMs
readwritenonatomicassign

◆ avSyncType

- (NSInteger) avSyncType
readwritenonatomicassign

Reserved for future use.

◆ rtpTimestamp

- (uint32_t) rtpTimestamp
readwritenonatomicassign

RTP timestamp of the first sample in the audio frame