Class ReferenceMutableAudioFrame

  • All Implemented Interfaces:
    AudioFrame

    public class ReferenceMutableAudioFrame
    extends AbstractMutableAudioFrame
    Mutable audio frame which contains no dedicated buffer, but refers to a segment in a specified byte buffer.
    • Constructor Detail

      • ReferenceMutableAudioFrame

        public ReferenceMutableAudioFrame()
    • Method Detail

      • getFrameBuffer

        public byte[] getFrameBuffer()
        Returns:
        The underlying byte buffer.
      • getFrameOffset

        public int getFrameOffset()
        Returns:
        Offset of the frame data in the underlying byte buffer.
      • getFrameEndOffset

        public int getFrameEndOffset()
        Returns:
        Offset of the end of frame data in the underlying byte buffer.
      • getDataLength

        public int getDataLength()
        Returns:
        Length of the data of this frame.
      • getData

        public byte[] getData()
        Returns:
        Byte array with the frame data.
      • getData

        public void getData​(byte[] buffer,
                            int offset)
        Description copied from interface: AudioFrame
        Before calling this method, the caller should verify that the data fits in the buffer using AudioFrame.getDataLength().
        Parameters:
        buffer - Buffer to write the frame data to.
        offset - Offset in the buffer to start writing at.