io.agora.rtc

## Class AgoraAudioPcmDataSender

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

-     public class AgoraAudioPcmDataSender
      extends java.lang.Object

- - ### Field Summary

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

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraAudioPcmDataSender(long cptr)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the audio data sender
    `private void` | `nativeDestroy(long cptr)`
    `private int` | `nativeSend(long cptr, byte[] audioData, int captureTimestamp, int samplesPerChannel, int bytesPerSample, int numberOfChannels, int sampleRate)`
    `int` | `send(byte[] audioData, int captureTimestamp, int samplesPerChannel, int bytesPerSample, int numberOfChannels, int sampleRate)` Deprecated. Use `sendAudioPcmData(AudioFrame)` instead
    `int` | `sendAudioPcmData(AudioFrame audioFrame)` Sends audio data

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

    - #### AgoraAudioPcmDataSender

          public AgoraAudioPcmDataSender(long cptr)

  - ### Method Detail

    - #### send

          @Deprecated
          public int send(byte[] audioData,
                                      int captureTimestamp,
                                      int samplesPerChannel,
                                      int bytesPerSample,
                                      int numberOfChannels,
                                      int sampleRate)

      Deprecated. Use `sendAudioPcmData(AudioFrame)` instead
      Sends audio data
      Parameters:
        `audioData` - The audio data
        `captureTimestamp` - The capture timestamp
        `samplesPerChannel` - The number of samples per channel
        `bytesPerSample` - The number of bytes per sample
        `numberOfChannels` - The number of channels
        `sampleRate` - The sample rate
      Returns:
        The result of sending audio data

    - #### sendAudioPcmData

          public int sendAudioPcmData(AudioFrame audioFrame)

      Sends audio data
      Parameters:
        `audioFrame` - The audio frame
      Returns:
        The result of sending audio data

    - #### destroy

          public void destroy()

      Destroys the audio data sender

    - #### nativeSend

          private int nativeSend(long cptr,
                                 byte[] audioData,
                                 int captureTimestamp,
                                 int samplesPerChannel,
                                 int bytesPerSample,
                                 int numberOfChannels,
                                 int sampleRate)

    - #### nativeDestroy

          private void nativeDestroy(long cptr)