Agora Java API Reference for Android
Public Types | Public Attributes | List of all members
agora::media::base::AudioPcmFrame Struct Reference

#include <AgoraMediaBase.h>

Public Types

enum  : size_t { kMaxDataSizeSamples = 3840, kMaxDataSizeBytes = kMaxDataSizeSamples * sizeof(int16_t) }
 

Public Attributes

uint32_t capture_timestamp
 
size_t samples_per_channel_
 
int sample_rate_hz_
 
size_t num_channels_
 
rtc::BYTES_PER_SAMPLE bytes_per_sample
 
int16_t data_ [kMaxDataSizeSamples]
 

Detailed Description

The detailed information of the incoming audio frame in the PCM format.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum : size_t

The buffer size of the PCM audio frame.

Enumerator
kMaxDataSizeSamples 

The max number of the samples of the data.

When the number of audio channel is two, the sample rate is 32 kHZ, the buffer length of the data is 60 ms, the number of the samples of the data is 3840 (2 x 32 x 60).

kMaxDataSizeBytes 

The max number of the bytes of the data.

Member Data Documentation

◆ capture_timestamp

uint32_t agora::media::base::AudioPcmFrame::capture_timestamp

The timestamp (ms) of the audio frame.

◆ samples_per_channel_

size_t agora::media::base::AudioPcmFrame::samples_per_channel_

The number of samples per channel.

◆ sample_rate_hz_

int agora::media::base::AudioPcmFrame::sample_rate_hz_

The sample rate (Hz) of the audio data.

◆ num_channels_

size_t agora::media::base::AudioPcmFrame::num_channels_

The channel number.

◆ bytes_per_sample

rtc::BYTES_PER_SAMPLE agora::media::base::AudioPcmFrame::bytes_per_sample

The number of bytes per sample.

◆ data_

int16_t agora::media::base::AudioPcmFrame::data_[kMaxDataSizeSamples]

The audio frame data.