io.agora.rtc

## Class EncodedAudioFrameInfo

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

-     public class EncodedAudioFrameInfo
      extends java.lang.Object

  Information about an encoded audio frame.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `captureTimeMs` Capture timestamp in milliseconds
    `private int` | `codec` Codec type of the audio frame
    `private int` | `numberOfChannels` Number of audio channels
    `private int` | `sampleRateHz` Sampling rate of the audio frame in Hz
    `private int` | `samplesPerChannel` Number of samples per audio channel
    `private int` | `sendEvenIfEmpty` Whether to send the frame even if it is empty
    `private int` | `speech` Indicates whether the frame contains speech

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `EncodedAudioFrameInfo()` Default constructor for EncodedAudioFrameInfo.
    `EncodedAudioFrameInfo(int speech, int codec, int sampleRateHz, int samplesPerChannel, int numberOfChannels, int sendEvenIfEmpty, long captureTimeMs)` Constructs EncodedAudioFrameInfo with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `long` | `getCaptureTimeMs()` Gets the capture timestamp in milliseconds.
    `int` | `getCodec()` Gets the codec type of the audio frame.
    `int` | `getNumberOfChannels()` Gets the number of audio channels.
    `int` | `getSampleRateHz()` Gets the sampling rate of the audio frame in Hz.
    `int` | `getSamplesPerChannel()` Gets the number of samples per audio channel.
    `int` | `getSendEvenIfEmpty()` Gets whether to send the frame even if it is empty.
    `int` | `getSpeech()` Gets whether the frame contains speech.
    `void` | `setCaptureTimeMs(long captureTimeMs)` Sets the capture timestamp in milliseconds.
    `void` | `setCodec(int codec)` Sets the codec type of the audio frame.
    `void` | `setNumberOfChannels(int numberOfChannels)` Sets the number of audio channels.
    `void` | `setSampleRateHz(int sampleRateHz)` Sets the sampling rate of the audio frame in Hz.
    `void` | `setSamplesPerChannel(int samplesPerChannel)` Sets the number of samples per audio channel.
    `void` | `setSendEvenIfEmpty(int sendEvenIfEmpty)` Sets whether to send the frame even if it is empty.
    `void` | `setSpeech(int speech)` Sets whether the frame contains speech.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### speech

          private int speech

      Indicates whether the frame contains speech

    - #### codec

          private int codec

      Codec type of the audio frame

    - #### sendEvenIfEmpty

          private int sendEvenIfEmpty

      Whether to send the frame even if it is empty

    - #### sampleRateHz

          private int sampleRateHz

      Sampling rate of the audio frame in Hz

    - #### samplesPerChannel

          private int samplesPerChannel

      Number of samples per audio channel

    - #### numberOfChannels

          private int numberOfChannels

      Number of audio channels

    - #### captureTimeMs

          private long captureTimeMs

      Capture timestamp in milliseconds

  - ### Constructor Detail

    - #### EncodedAudioFrameInfo

          public EncodedAudioFrameInfo()

      Default constructor for EncodedAudioFrameInfo.

    - #### EncodedAudioFrameInfo

          public EncodedAudioFrameInfo(int speech,
                                       int codec,
                                       int sampleRateHz,
                                       int samplesPerChannel,
                                       int numberOfChannels,
                                       int sendEvenIfEmpty,
                                       long captureTimeMs)

      Constructs EncodedAudioFrameInfo with all parameters.
      Parameters:
        `speech` - Indicates whether the frame contains speech
        `codec` - Codec type of the audio frame
        `sampleRateHz` - Sampling rate of the audio frame in Hz
        `samplesPerChannel` - Number of samples per audio channel
        `numberOfChannels` - Number of audio channels
        `sendEvenIfEmpty` - Whether to send the frame even if it is empty
        `captureTimeMs` - Capture timestamp in milliseconds

  - ### Method Detail

    - #### getSpeech

          public int getSpeech()

      Gets whether the frame contains speech.
      Returns:
        Whether the frame contains speech

    - #### setSpeech

          public void setSpeech(int speech)

      Sets whether the frame contains speech.
      Parameters:
        `speech` - Whether the frame contains speech

    - #### getCodec

          public int getCodec()

      Gets the codec type of the audio frame.
      Returns:
        Codec type of the audio frame

    - #### setCodec

          public void setCodec(int codec)

      Sets the codec type of the audio frame.
      Parameters:
        `codec` - Codec type of the audio frame

    - #### getSendEvenIfEmpty

          public int getSendEvenIfEmpty()

      Gets whether to send the frame even if it is empty.
      Returns:
        Whether to send the frame even if it is empty

    - #### setSendEvenIfEmpty

          public void setSendEvenIfEmpty(int sendEvenIfEmpty)

      Sets whether to send the frame even if it is empty.
      Parameters:
        `sendEvenIfEmpty` - Whether to send the frame even if it is empty

    - #### getSampleRateHz

          public int getSampleRateHz()

      Gets the sampling rate of the audio frame in Hz.
      Returns:
        Sampling rate of the audio frame in Hz

    - #### setSampleRateHz

          public void setSampleRateHz(int sampleRateHz)

      Sets the sampling rate of the audio frame in Hz.
      Parameters:
        `sampleRateHz` - Sampling rate of the audio frame in Hz

    - #### getSamplesPerChannel

          public int getSamplesPerChannel()

      Gets the number of samples per audio channel.
      Returns:
        Number of samples per audio channel

    - #### setSamplesPerChannel

          public void setSamplesPerChannel(int samplesPerChannel)

      Sets the number of samples per audio channel.
      Parameters:
        `samplesPerChannel` - Number of samples per audio channel

    - #### 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

    - #### getCaptureTimeMs

          public long getCaptureTimeMs()

      Gets the capture timestamp in milliseconds.
      Returns:
        Capture timestamp in milliseconds

    - #### setCaptureTimeMs

          public void setCaptureTimeMs(long captureTimeMs)

      Sets the capture timestamp in milliseconds.
      Parameters:
        `captureTimeMs` - Capture timestamp in milliseconds

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`