Server Gateway SDK v3.7.200.21 for Linux Java
Public Member Functions | List of all members
io.agora.rtc.AudioFrame Class Reference

Public Member Functions

 AudioFrame ()
 
 AudioFrame (int type, int samplesPerChannel, int bytesPerSample, int channels, int samplesPerSec, byte[] buffer, long renderTimeMs, int avsyncType)
 
int getType ()
 
void setType (int type)
 
int getSamplesPerChannel ()
 
void setSamplesPerChannel (int samplesPerChannel)
 
int getBytesPerSample ()
 
void setBytesPerSample (int bytesPerSample)
 
int getChannels ()
 
void setChannels (int channels)
 
int getSamplesPerSec ()
 
void setSamplesPerSec (int samplesPerSec)
 
byte[] getBuffer ()
 
void setBuffer (byte[] buffer)
 
long getRenderTimeMs ()
 
void setRenderTimeMs (long renderTimeMs)
 
int getAvsyncType ()
 
void setAvsyncType (int avsyncType)
 

Detailed Description

The AudioFrame class.

Constructor & Destructor Documentation

◆ AudioFrame() [1/2]

io.agora.rtc.AudioFrame.AudioFrame ( )

◆ AudioFrame() [2/2]

io.agora.rtc.AudioFrame.AudioFrame ( int  type,
int  samplesPerChannel,
int  bytesPerSample,
int  channels,
int  samplesPerSec,
byte[]  buffer,
long  renderTimeMs,
int  avsyncType 
)

Constructor.

Parameters
typeThe audio frame type.
  • 0: 16-bit PCM.
samplesPerChannelThe number of samples per channel in this frame.
bytesPerSampleThe number of bytes per sample.
channelsThe number of audio channels (data is interleaved, if stereo).
samplesPerSecThe sample rate of the audio frame.
bufferThe pointer to the audio data buffer.
renderTimeMsThe timestamp to render the audio data. Use this member for audio-video synchronization when rendering the audio. This parameter is the timestamp for audio rendering. Set it as 0.

Member Function Documentation

◆ getAvsyncType()

int io.agora.rtc.AudioFrame.getAvsyncType ( )

◆ getBuffer()

byte[] io.agora.rtc.AudioFrame.getBuffer ( )

◆ getBytesPerSample()

int io.agora.rtc.AudioFrame.getBytesPerSample ( )

◆ getChannels()

int io.agora.rtc.AudioFrame.getChannels ( )

◆ getRenderTimeMs()

long io.agora.rtc.AudioFrame.getRenderTimeMs ( )

◆ getSamplesPerChannel()

int io.agora.rtc.AudioFrame.getSamplesPerChannel ( )

◆ getSamplesPerSec()

int io.agora.rtc.AudioFrame.getSamplesPerSec ( )

◆ getType()

int io.agora.rtc.AudioFrame.getType ( )

◆ setAvsyncType()

void io.agora.rtc.AudioFrame.setAvsyncType ( int  avsyncType)

◆ setBuffer()

void io.agora.rtc.AudioFrame.setBuffer ( byte[]  buffer)

◆ setBytesPerSample()

void io.agora.rtc.AudioFrame.setBytesPerSample ( int  bytesPerSample)

◆ setChannels()

void io.agora.rtc.AudioFrame.setChannels ( int  channels)

◆ setRenderTimeMs()

void io.agora.rtc.AudioFrame.setRenderTimeMs ( long  renderTimeMs)

◆ setSamplesPerChannel()

void io.agora.rtc.AudioFrame.setSamplesPerChannel ( int  samplesPerChannel)

◆ setSamplesPerSec()

void io.agora.rtc.AudioFrame.setSamplesPerSec ( int  samplesPerSec)

◆ setType()

void io.agora.rtc.AudioFrame.setType ( int  type)

The documentation for this class was generated from the following file: