Class MutableAudioFrame

    • Constructor Detail

      • MutableAudioFrame

        public MutableAudioFrame()
    • Method Detail

      • setBuffer

        public void setBuffer​(java.nio.ByteBuffer frameBuffer)
        This should be called only by the requester of a frame.
        Parameters:
        frameBuffer - Buffer to use internally.
      • store

        public void store​(byte[] buffer,
                          int offset,
                          int length)
        This should be called only by the provider of a frame.
        Parameters:
        buffer - Buffer to copy data from into the internal buffer of this instance.
        offset - Offset in the buffer.
        length - Length of the data to copy.
      • 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.