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

Public Member Functions

 AudioSubscriptionOptions ()
 AudioSubscriptionOptions (int packetOnly, int pcmDataOnly, int bytesPerSample, int numberOfChannels, int sampleRateHz)
int getPacketOnly ()
void setPacketOnly (int packetOnly)
int getPcmDataOnly ()
void setPcmDataOnly (int pcmDataOnly)
int getBytesPerSample ()
void setBytesPerSample (int bytesPerSample)
int getNumberOfChannels ()
void setNumberOfChannels (int numberOfChannels)
int getSampleRateHz ()
void setSampleRateHz (int sampleRateHz)

Detailed Description

The audio subscription options.

Constructor & Destructor Documentation

◆ AudioSubscriptionOptions() [1/2]

io.agora.rtc.AudioSubscriptionOptions.AudioSubscriptionOptions ( )

◆ AudioSubscriptionOptions() [2/2]

io.agora.rtc.AudioSubscriptionOptions.AudioSubscriptionOptions ( int  packetOnly,
int  pcmDataOnly,
int  bytesPerSample,
int  numberOfChannels,
int  sampleRateHz 


packetOnlyWhether to only subscribe to audio packets.
  • true: Only subscribe to audio packets, which means that the SDK does not decode the remote audio stream. You can use this mode to receive audio packets and handle them in your app.
  • false: (Default) The SDK automatically decodes the remote audio stream.
If you set packetOnly as true, other parameters in AudioSubscriptionOptions are ignored.
pcmDataOnlyWhether to only subscribe to PCM data.
  • true: Only subscribe to PCM data.
  • false: (Default) The SDK automatically encodes the remote audio stream.
bytesPerSampleThe number of bytes that you expect for each audio sample.
numberOfChannelsThe number of audio channels that you expect.
sampleRateHzThe audio sample rate (Hz) that you expect.

Member Function Documentation

◆ getBytesPerSample()

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

◆ getNumberOfChannels()

int io.agora.rtc.AudioSubscriptionOptions.getNumberOfChannels ( )

◆ getPacketOnly()

int io.agora.rtc.AudioSubscriptionOptions.getPacketOnly ( )

◆ getPcmDataOnly()

int io.agora.rtc.AudioSubscriptionOptions.getPcmDataOnly ( )

◆ getSampleRateHz()

int io.agora.rtc.AudioSubscriptionOptions.getSampleRateHz ( )

◆ setBytesPerSample()

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

◆ setNumberOfChannels()

void io.agora.rtc.AudioSubscriptionOptions.setNumberOfChannels ( int  numberOfChannels)

◆ setPacketOnly()

void io.agora.rtc.AudioSubscriptionOptions.setPacketOnly ( int  packetOnly)

◆ setPcmDataOnly()

void io.agora.rtc.AudioSubscriptionOptions.setPcmDataOnly ( int  pcmDataOnly)

◆ setSampleRateHz()

void io.agora.rtc.AudioSubscriptionOptions.setSampleRateHz ( int  sampleRateHz)

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