Agora Java API Reference for Android
Public Member Functions | Public Attributes | List of all members
agora::rtc::AudioSubscriptionOptions Struct Reference

#include <NGIAgoraRtcConnection.h>

Public Member Functions

 AudioSubscriptionOptions (const AudioSubscriptionOptions &rhs)
 

Public Attributes

bool packetOnly
 
size_t bytesPerSample
 
size_t numberOfChannels
 
uint32_t sampleRateHz
 

Detailed Description

The audio subscription options.

Member Data Documentation

◆ packetOnly

bool agora::rtc::AudioSubscriptionOptions::packetOnly

Whether 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.
Note
If you set packetOnly as true, other fields in AudioSubscriptionOptions are ignored.

◆ bytesPerSample

size_t agora::rtc::AudioSubscriptionOptions::bytesPerSample

The number of bytes that you expect for each audio sample.

◆ numberOfChannels

size_t agora::rtc::AudioSubscriptionOptions::numberOfChannels

The number of audio channels that you expect.

◆ sampleRateHz

uint32_t agora::rtc::AudioSubscriptionOptions::sampleRateHz

The audio sample rate (Hz) that you expect.