io.agora.rtc

## Class RemoteAudioTrackStats

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

-     public class RemoteAudioTrackStats
      extends java.lang.Object

  Statistics of the remote audio track.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `audioLossRate` The audio frame loss rate in the reported interval.
    `private int` | `frozenRate` The total audio freeze time as a percentage (%) of the total time when the audio is available.
    `private int` | `jitterBufferDelay` Delay (ms) from the receiver to the jitter buffer.
    `private int` | `networkTransportDelay` Network delay (ms) from the sender to the receiver.
    `private int` | `numChannels` The number of channels.
    `private int` | `quality` Audio quality received by the user.
    `private int` | `receivedBitrate` The average bitrate (Kbps) of the received audio stream in the reported interval.
    `private long` | `receivedBytes` The number of audio bytes received.
    `private int` | `receivedSampleRate` The sample rate (Hz) of the received audio stream in the reported interval.
    `private int` | `totalFrozenTime` The total freeze time (ms) of the remote audio stream after the remote user joins the channel.
    `private int` | `uid` User ID of the remote user sending the audio streams.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RemoteAudioTrackStats()` Default constructor for RemoteAudioTrackStats.
    `RemoteAudioTrackStats(int uid, int quality, int networkTransportDelay, int jitterBufferDelay, int audioLossRate, int numChannels, int receivedSampleRate, int receivedBitrate, int totalFrozenTime, int frozenRate, long receivedBytes)` Constructs RemoteAudioTrackStats with all parameters.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `int` | `getAudioLossRate()` Gets the audio frame loss rate.
    `int` | `getFrozenRate()` Gets the freeze rate (%).
    `int` | `getJitterBufferDelay()` Gets the jitter buffer delay (ms).
    `int` | `getNetworkTransportDelay()` Gets the network delay (ms).
    `int` | `getNumChannels()` Gets the number of channels.
    `int` | `getQuality()` Gets the audio quality.
    `int` | `getReceivedBitrate()` Gets the received bitrate (Kbps).
    `long` | `getReceivedBytes()` Gets the number of audio bytes received.
    `int` | `getReceivedSampleRate()` Gets the received sample rate (Hz).
    `int` | `getTotalFrozenTime()` Gets the total freeze time (ms).
    `int` | `getUid()` Gets the user ID.
    `void` | `setAudioLossRate(int audioLossRate)` Sets the audio frame loss rate.
    `void` | `setFrozenRate(int frozenRate)` Sets the freeze rate (%).
    `void` | `setJitterBufferDelay(int jitterBufferDelay)` Sets the jitter buffer delay (ms).
    `void` | `setNetworkTransportDelay(int networkTransportDelay)` Sets the network delay (ms).
    `void` | `setNumChannels(int numChannels)` Sets the number of channels.
    `void` | `setQuality(int quality)` Sets the audio quality.
    `void` | `setReceivedBitrate(int receivedBitrate)` Sets the received bitrate (Kbps).
    `void` | `setReceivedBytes(long receivedBytes)` Sets the number of audio bytes received.
    `void` | `setReceivedSampleRate(int receivedSampleRate)` Sets the received sample rate (Hz).
    `void` | `setTotalFrozenTime(int totalFrozenTime)` Sets the total freeze time (ms).
    `void` | `setUid(int uid)` Sets the user ID.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### uid

          private int uid

      User ID of the remote user sending the audio streams.

    - #### quality

          private int quality

      Audio quality received by the user.

    - #### networkTransportDelay

          private int networkTransportDelay

      Network delay (ms) from the sender to the receiver.

    - #### jitterBufferDelay

          private int jitterBufferDelay

      Delay (ms) from the receiver to the jitter buffer.

    - #### audioLossRate

          private int audioLossRate

      The audio frame loss rate in the reported interval.

    - #### numChannels

          private int numChannels

      The number of channels.

    - #### receivedSampleRate

          private int receivedSampleRate

      The sample rate (Hz) of the received audio stream in the reported interval.

    - #### receivedBitrate

          private int receivedBitrate

      The average bitrate (Kbps) of the received audio stream in the reported interval.

    - #### totalFrozenTime

          private int totalFrozenTime

      The total freeze time (ms) of the remote audio stream after the remote user joins the channel. In a session, audio freeze occurs when the audio frame loss rate reaches 4%. Agora uses 2 seconds as an audio piece unit to calculate the audio freeze time. The total audio freeze time = The audio freeze number x 2 seconds

    - #### frozenRate

          private int frozenRate

      The total audio freeze time as a percentage (%) of the total time when the audio is available.

    - #### receivedBytes

          private long receivedBytes

      The number of audio bytes received.

  - ### Constructor Detail

    - #### RemoteAudioTrackStats

          public RemoteAudioTrackStats()

      Default constructor for RemoteAudioTrackStats.

    - #### RemoteAudioTrackStats

          public RemoteAudioTrackStats(int uid,
                                       int quality,
                                       int networkTransportDelay,
                                       int jitterBufferDelay,
                                       int audioLossRate,
                                       int numChannels,
                                       int receivedSampleRate,
                                       int receivedBitrate,
                                       int totalFrozenTime,
                                       int frozenRate,
                                       long receivedBytes)

      Constructs RemoteAudioTrackStats with all parameters.
      Parameters:
        `uid` - User ID of the remote user
        `quality` - Audio quality
        `networkTransportDelay` - Network delay (ms)
        `jitterBufferDelay` - Jitter buffer delay (ms)
        `audioLossRate` - Audio frame loss rate
        `numChannels` - Number of channels
        `receivedSampleRate` - Received sample rate (Hz)
        `receivedBitrate` - Received bitrate (Kbps)
        `totalFrozenTime` - Total freeze time (ms)
        `frozenRate` - Freeze rate (%)
        `receivedBytes` - Number of audio bytes received

  - ### Method Detail

    - #### getUid

          public int getUid()

      Gets the user ID.
      Returns:
        User ID

    - #### setUid

          public void setUid(int uid)

      Sets the user ID.
      Parameters:
        `uid` - User ID

    - #### getQuality

          public int getQuality()

      Gets the audio quality.
      Returns:
        Audio quality

    - #### setQuality

          public void setQuality(int quality)

      Sets the audio quality.
      Parameters:
        `quality` - Audio quality

    - #### getNetworkTransportDelay

          public int getNetworkTransportDelay()

      Gets the network delay (ms).
      Returns:
        Network delay (ms)

    - #### setNetworkTransportDelay

          public void setNetworkTransportDelay(int networkTransportDelay)

      Sets the network delay (ms).
      Parameters:
        `networkTransportDelay` - Network delay (ms)

    - #### getJitterBufferDelay

          public int getJitterBufferDelay()

      Gets the jitter buffer delay (ms).
      Returns:
        Jitter buffer delay (ms)

    - #### setJitterBufferDelay

          public void setJitterBufferDelay(int jitterBufferDelay)

      Sets the jitter buffer delay (ms).
      Parameters:
        `jitterBufferDelay` - Jitter buffer delay (ms)

    - #### getAudioLossRate

          public int getAudioLossRate()

      Gets the audio frame loss rate.
      Returns:
        Audio frame loss rate

    - #### setAudioLossRate

          public void setAudioLossRate(int audioLossRate)

      Sets the audio frame loss rate.
      Parameters:
        `audioLossRate` - Audio frame loss rate

    - #### getNumChannels

          public int getNumChannels()

      Gets the number of channels.
      Returns:
        Number of channels

    - #### setNumChannels

          public void setNumChannels(int numChannels)

      Sets the number of channels.
      Parameters:
        `numChannels` - Number of channels

    - #### getReceivedSampleRate

          public int getReceivedSampleRate()

      Gets the received sample rate (Hz).
      Returns:
        Received sample rate (Hz)

    - #### setReceivedSampleRate

          public void setReceivedSampleRate(int receivedSampleRate)

      Sets the received sample rate (Hz).
      Parameters:
        `receivedSampleRate` - Received sample rate (Hz)

    - #### getReceivedBitrate

          public int getReceivedBitrate()

      Gets the received bitrate (Kbps).
      Returns:
        Received bitrate (Kbps)

    - #### setReceivedBitrate

          public void setReceivedBitrate(int receivedBitrate)

      Sets the received bitrate (Kbps).
      Parameters:
        `receivedBitrate` - Received bitrate (Kbps)

    - #### getTotalFrozenTime

          public int getTotalFrozenTime()

      Gets the total freeze time (ms).
      Returns:
        Total freeze time (ms)

    - #### setTotalFrozenTime

          public void setTotalFrozenTime(int totalFrozenTime)

      Sets the total freeze time (ms).
      Parameters:
        `totalFrozenTime` - Total freeze time (ms)

    - #### getFrozenRate

          public int getFrozenRate()

      Gets the freeze rate (%).
      Returns:
        Freeze rate (%)

    - #### setFrozenRate

          public void setFrozenRate(int frozenRate)

      Sets the freeze rate (%).
      Parameters:
        `frozenRate` - Freeze rate (%)

    - #### getReceivedBytes

          public long getReceivedBytes()

      Gets the number of audio bytes received.
      Returns:
        Number of audio bytes received

    - #### setReceivedBytes

          public void setReceivedBytes(long receivedBytes)

      Sets the number of audio bytes received.
      Parameters:
        `receivedBytes` - Number of audio bytes received

    - #### toString

          public java.lang.String toString()

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