io.agora.rtc

## Class LocalAudioStats

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

-     public class LocalAudioStats
      extends java.lang.Object

  Statistics of the local audio stream.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `internalCodec` The internal payload codec.
    `private int` | `numChannels` The number of audio channels.
    `private int` | `sentBitrate` The average bitrate (Kbps) of sending the local user's audio stream.
    `private int` | `sentSampleRate` The sampling rate (Hz) of sending the local user's audio stream.
    `private double` | `voicePitch` Voice pitch frequency in Hz.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `LocalAudioStats()` Default constructor for LocalAudioStats.
    `LocalAudioStats(int numChannels, int sentSampleRate, int sentBitrate, int internalCodec, double voicePitch)` Constructs LocalAudioStats with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getInternalCodec()` Gets the internal payload codec.
    `int` | `getNumChannels()` Gets the number of audio channels.
    `int` | `getSentBitrate()` Gets the average bitrate (Kbps) of sending the local user's audio stream.
    `int` | `getSentSampleRate()` Gets the sampling rate (Hz) of sending the local user's audio stream.
    `double` | `getVoicePitch()` Gets the voice pitch frequency in Hz.
    `void` | `setInternalCodec(int internalCodec)` Sets the internal payload codec.
    `void` | `setNumChannels(int numChannels)` Sets the number of audio channels.
    `void` | `setSentBitrate(int sentBitrate)` Sets the average bitrate (Kbps) of sending the local user's audio stream.
    `void` | `setSentSampleRate(int sentSampleRate)` Sets the sampling rate (Hz) of sending the local user's audio stream.
    `void` | `setVoicePitch(double voicePitch)` Sets the voice pitch frequency in Hz.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### numChannels

          private int numChannels

      The number of audio channels.

    - #### sentSampleRate

          private int sentSampleRate

      The sampling rate (Hz) of sending the local user's audio stream.

    - #### sentBitrate

          private int sentBitrate

      The average bitrate (Kbps) of sending the local user's audio stream.

    - #### internalCodec

          private int internalCodec

      The internal payload codec.

    - #### voicePitch

          private double voicePitch

      Voice pitch frequency in Hz.

  - ### Constructor Detail

    - #### LocalAudioStats

          public LocalAudioStats()

      Default constructor for LocalAudioStats.

    - #### LocalAudioStats

          public LocalAudioStats(int numChannels,
                                 int sentSampleRate,
                                 int sentBitrate,
                                 int internalCodec,
                                 double voicePitch)

      Constructs LocalAudioStats with all parameters.
      Parameters:
        `numChannels` - The number of audio channels
        `sentSampleRate` - The sampling rate (Hz) of sending the local user's audio stream
        `sentBitrate` - The average bitrate (Kbps) of sending the local user's audio stream
        `internalCodec` - The internal payload codec
        `voicePitch` - Voice pitch frequency in Hz

  - ### Method Detail

    - #### getNumChannels

          public int getNumChannels()

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

    - #### setNumChannels

          public void setNumChannels(int numChannels)

      Sets the number of audio channels.
      Parameters:
        `numChannels` - The number of audio channels

    - #### getSentSampleRate

          public int getSentSampleRate()

      Gets the sampling rate (Hz) of sending the local user's audio stream.
      Returns:
        The sampling rate (Hz) of sending the local user's audio stream

    - #### setSentSampleRate

          public void setSentSampleRate(int sentSampleRate)

      Sets the sampling rate (Hz) of sending the local user's audio stream.
      Parameters:
        `sentSampleRate` - The sampling rate (Hz) of sending the local user's audio stream

    - #### getSentBitrate

          public int getSentBitrate()

      Gets the average bitrate (Kbps) of sending the local user's audio stream.
      Returns:
        The average bitrate (Kbps) of sending the local user's audio stream

    - #### setSentBitrate

          public void setSentBitrate(int sentBitrate)

      Sets the average bitrate (Kbps) of sending the local user's audio stream.
      Parameters:
        `sentBitrate` - The average bitrate (Kbps) of sending the local user's audio stream

    - #### getInternalCodec

          public int getInternalCodec()

      Gets the internal payload codec.
      Returns:
        The internal payload codec

    - #### setInternalCodec

          public void setInternalCodec(int internalCodec)

      Sets the internal payload codec.
      Parameters:
        `internalCodec` - The internal payload codec

    - #### getVoicePitch

          public double getVoicePitch()

      Gets the voice pitch frequency in Hz.
      Returns:
        Voice pitch frequency in Hz

    - #### setVoicePitch

          public void setVoicePitch(double voicePitch)

      Sets the voice pitch frequency in Hz.
      Parameters:
        `voicePitch` - Voice pitch frequency in Hz

    - #### toString

          public java.lang.String toString()

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