io.agora.rtc

## Class AudioSubscriptionOptions

- java.lang.Object
- - io.agora.rtc.AudioSubscriptionOptions

-     public class AudioSubscriptionOptions
      extends java.lang.Object

  Audio subscription options configuration.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `bytesPerSample` Number of bytes per sample
    `private int` | `numberOfChannels` Number of audio channels
    `private int` | `packetOnly` Packet only flag
    `private int` | `pcmDataOnly` PCM data only flag
    `private int` | `sampleRateHz` Sample rate in Hz

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AudioSubscriptionOptions()` Default constructor for AudioSubscriptionOptions.
    `AudioSubscriptionOptions(int packetOnly, int pcmDataOnly, int bytesPerSample, int numberOfChannels, int sampleRateHz)` Constructs AudioSubscriptionOptions with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getBytesPerSample()` Gets the number of bytes per sample.
    `int` | `getNumberOfChannels()` Gets the number of audio channels.
    `int` | `getPacketOnly()` Gets the packet only flag.
    `int` | `getPcmDataOnly()` Gets the PCM data only flag.
    `int` | `getSampleRateHz()` Gets the sample rate in Hz.
    `void` | `setBytesPerSample(int bytesPerSample)` Sets the number of bytes per sample.
    `void` | `setNumberOfChannels(int numberOfChannels)` Sets the number of audio channels.
    `void` | `setPacketOnly(int packetOnly)` Sets the packet only flag.
    `void` | `setPcmDataOnly(int pcmDataOnly)` Sets the PCM data only flag.
    `void` | `setSampleRateHz(int sampleRateHz)` Sets the sample rate in Hz.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### packetOnly

          private int packetOnly

      Packet only flag

    - #### pcmDataOnly

          private int pcmDataOnly

      PCM data only flag

    - #### bytesPerSample

          private int bytesPerSample

      Number of bytes per sample

    - #### numberOfChannels

          private int numberOfChannels

      Number of audio channels

    - #### sampleRateHz

          private int sampleRateHz

      Sample rate in Hz

  - ### Constructor Detail

    - #### AudioSubscriptionOptions

          public AudioSubscriptionOptions()

      Default constructor for AudioSubscriptionOptions.

    - #### AudioSubscriptionOptions

          public AudioSubscriptionOptions(int packetOnly,
                                          int pcmDataOnly,
                                          int bytesPerSample,
                                          int numberOfChannels,
                                          int sampleRateHz)

      Constructs AudioSubscriptionOptions with all parameters.
      Parameters:
        `packetOnly` - Packet only flag
        `pcmDataOnly` - PCM data only flag
        `bytesPerSample` - Number of bytes per sample
        `numberOfChannels` - Number of audio channels
        `sampleRateHz` - Sample rate in Hz

  - ### Method Detail

    - #### getPacketOnly

          public int getPacketOnly()

      Gets the packet only flag.
      Returns:
        Packet only flag

    - #### setPacketOnly

          public void setPacketOnly(int packetOnly)

      Sets the packet only flag.
      Parameters:
        `packetOnly` - Packet only flag

    - #### getPcmDataOnly

          public int getPcmDataOnly()

      Gets the PCM data only flag.
      Returns:
        PCM data only flag

    - #### setPcmDataOnly

          public void setPcmDataOnly(int pcmDataOnly)

      Sets the PCM data only flag.
      Parameters:
        `pcmDataOnly` - PCM data only flag

    - #### getBytesPerSample

          public int getBytesPerSample()

      Gets the number of bytes per sample.
      Returns:
        Number of bytes per sample

    - #### setBytesPerSample

          public void setBytesPerSample(int bytesPerSample)

      Sets the number of bytes per sample.
      Parameters:
        `bytesPerSample` - Number of bytes per sample

    - #### getNumberOfChannels

          public int getNumberOfChannels()

      Gets the number of audio channels.
      Returns:
        Number of audio channels

    - #### setNumberOfChannels

          public void setNumberOfChannels(int numberOfChannels)

      Sets the number of audio channels.
      Parameters:
        `numberOfChannels` - Number of audio channels

    - #### getSampleRateHz

          public int getSampleRateHz()

      Gets the sample rate in Hz.
      Returns:
        Sample rate in Hz

    - #### setSampleRateHz

          public void setSampleRateHz(int sampleRateHz)

      Sets the sample rate in Hz.
      Parameters:
        `sampleRateHz` - Sample rate in Hz