Package 

Class AudioFrame

  • All Implemented Interfaces:
    java.lang.Comparable

    
    public class AudioFrame
    extends RtpFrame
                        

    Represents an audio frame for RTP communication.

    • Method Summary

      Modifier and Type Method Description
      void copy(Array<byte> data, int len) Copies the specified data into this AudioFrame.
      void copy(Array<byte> data, int offset, int len) Copies the specified data into this AudioFrame with an offset.
      void copy(Array<byte> data) Copies the specified data into this AudioFrame.
      static AudioFrame getNewFrame(int len) Retrieves a new AudioFrame with the specified length.
      static void free(AudioFrame frame) Frees the specified AudioFrame for reuse.
      AudioFrame cloneFrame() Clones this AudioFrame.
      int compareTo(RtpFrame that) Compares this AudioFrame with another RtpFrame based on sequence number.
      void onDestroy() Frees this AudioFrame when it is destroyed.
      String toString() Returns a string representation of this AudioFrame.
      • Methods inherited from class java.lang.Comparable

        compareTo
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • copy

         void copy(Array<byte> data, int len)

        Copies the specified data into this AudioFrame.

        Parameters:
        data - the audio data to copy.
        len - the length of the audio data.
      • copy

         void copy(Array<byte> data, int offset, int len)

        Copies the specified data into this AudioFrame with an offset.

        Parameters:
        data - the audio data to copy.
        offset - the offset in the data array.
        len - the length of the audio data.
      • copy

         void copy(Array<byte> data)

        Copies the specified data into this AudioFrame.

        Parameters:
        data - the audio data to copy.
      • getNewFrame

         static AudioFrame getNewFrame(int len)

        Retrieves a new AudioFrame with the specified length.

        Parameters:
        len - the length of the audio data.
      • free

         static void free(AudioFrame frame)

        Frees the specified AudioFrame for reuse.

        Parameters:
        frame - the AudioFrame to free.
      • compareTo

         int compareTo(RtpFrame that)

        Compares this AudioFrame with another RtpFrame based on sequence number.

        Parameters:
        that - the other RtpFrame to compare with.
      • onDestroy

         void onDestroy()

        Frees this AudioFrame when it is destroyed.