io.agora.rtc

## Class AgoraAudioEncodedFrameSender

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

-     class AgoraAudioEncodedFrameSender
      extends java.lang.Object

  Sender for encoded audio frames.

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraAudioEncodedFrameSender(long cptr)` Constructs an AgoraAudioEncodedFrameSender.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the audio encoded frame sender
    `private void` | `nativeDestroy(long cptr)` Native destroy method.
    `private int` | `nativeSend(long cptr, byte[] payloadData, int payloadSize, EncodedAudioFrameInfo info)` Native method to send encoded audio frame.
    `int` | `sendEncodedAudioFrame(byte[] payloadData, EncodedAudioFrameInfo info)` Sends an encoded audio frame to the Agora server

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

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

- - ### Field Detail

    - #### cptr

          private long cptr

      Native pointer

  - ### Constructor Detail

    - #### AgoraAudioEncodedFrameSender

          public AgoraAudioEncodedFrameSender(long cptr)

      Constructs an AgoraAudioEncodedFrameSender.
      Parameters:
        `cptr` - Native pointer

  - ### Method Detail

    - #### sendEncodedAudioFrame

          public int sendEncodedAudioFrame(byte[] payloadData,
                                           EncodedAudioFrameInfo info)

      Sends an encoded audio frame to the Agora server
      Parameters:
        `payloadData` - The encoded audio data
        `info` - The information about the encoded audio frame
      Returns:
        The result of sending the encoded audio frame

    - #### destroy

          public void destroy()

      Destroys the audio encoded frame sender

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

      Native destroy method.
      Parameters:
        `cptr` - Native pointer

    - #### nativeSend

          private int nativeSend(long cptr,
                                 byte[] payloadData,
                                 int payloadSize,
                                 EncodedAudioFrameInfo info)

      Native method to send encoded audio frame.
      Parameters:
        `cptr` - Native pointer
        `payloadData` - Encoded audio data
        `payloadSize` - Size of payload
        `info` - Encoded audio frame info
      Returns:
        Result code