io.agora.rtc

## Class AgoraRemoteAudioTrack

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

-     public class AgoraRemoteAudioTrack
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `cptr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraRemoteAudioTrack(long cptr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the remote audio track.
    `void` | `destroyStatistics(RemoteAudioTrackStats stats)`
    `long` | `getNativeHandle()` Gets the native handle of the remote audio track.
    `int` | `getState()`
    `RemoteAudioTrackStats` | `getStatistics()`
    `private void` | `nativeDestroy(long cptr)`
    `private void` | `nativeDestroyStatistics(long cptr, RemoteAudioTrackStats stats)`
    `private int` | `nativeGetState(long cptr)`
    `private RemoteAudioTrackStats` | `nativeGetStatistics(long cptr)`
    `private int` | `nativeRegisterMediaPacketReceiver(long cptr, AgoraMediaPacketReceiver agoraMediaPacketReceiver)`
    `private int` | `nativeUnregisterMediaPacketReceiver(long cptr, AgoraMediaPacketReceiver agoraMediaPacketReceiver)`
    `int` | `registerMediaPacketReceiver(AgoraMediaPacketReceiver agoraMediaPacketReceiver)`
    `int` | `unregisterMediaPacketReceiver(AgoraMediaPacketReceiver agoraMediaPacketReceiver)`

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

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

- - ### Field Detail

    - #### cptr

          private long cptr

  - ### Constructor Detail

    - #### AgoraRemoteAudioTrack

          public AgoraRemoteAudioTrack(long cptr)

  - ### Method Detail

    - #### getNativeHandle

          public long getNativeHandle()

      Gets the native handle of the remote audio track.
      Returns:
        The native handle of the remote audio track.

    - #### destroy

          public void destroy()

      Destroys the remote audio track. Ensures that the native resources are released.

    - #### getStatistics

          public RemoteAudioTrackStats getStatistics()

    - #### destroyStatistics

          public void destroyStatistics(RemoteAudioTrackStats stats)

    - #### getState

          public int getState()

    - #### registerMediaPacketReceiver

          public int registerMediaPacketReceiver(AgoraMediaPacketReceiver agoraMediaPacketReceiver)

    - #### unregisterMediaPacketReceiver

          public int unregisterMediaPacketReceiver(AgoraMediaPacketReceiver agoraMediaPacketReceiver)

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

    - #### nativeGetStatistics

          private RemoteAudioTrackStats nativeGetStatistics(long cptr)

    - #### nativeDestroyStatistics

          private void nativeDestroyStatistics(long cptr,
                                               RemoteAudioTrackStats stats)

    - #### nativeGetState

          private int nativeGetState(long cptr)

    - #### nativeRegisterMediaPacketReceiver

          private int nativeRegisterMediaPacketReceiver(long cptr,
                                                        AgoraMediaPacketReceiver agoraMediaPacketReceiver)

    - #### nativeUnregisterMediaPacketReceiver

          private int nativeUnregisterMediaPacketReceiver(long cptr,
                                                          AgoraMediaPacketReceiver agoraMediaPacketReceiver)