Interface AudioFrameBuffer

    • Method Detail

      • getRemainingCapacity

        int getRemainingCapacity()
        Returns:
        Number of frames that can be added to the buffer without blocking.
      • getFullCapacity

        int getFullCapacity()
        Returns:
        Total number of frames that the buffer can hold.
      • waitForTermination

        void waitForTermination()
                         throws java.lang.InterruptedException
        Wait until another thread has consumed a terminator frame from this buffer
        Throws:
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • setTerminateOnEmpty

        void setTerminateOnEmpty()
        Signal that no more input is expected and if the content frames have been consumed, emit a terminator frame.
      • setClearOnInsert

        void setClearOnInsert()
        Signal that the next frame provided to the buffer will clear the frames before it. This is useful when the next data is not contiguous with the current frame buffer, but the remaining frames in the buffer should be used until the next data arrives to prevent a situation where the buffer cannot provide any frames for a while.
      • hasClearOnInsert

        boolean hasClearOnInsert()
        Returns:
        Whether the next frame is set to clear the buffer.
      • clear

        void clear()
        Clear the buffer.
      • lockBuffer

        void lockBuffer()
        Lock the buffer so no more incoming frames are accepted.
      • hasReceivedFrames

        boolean hasReceivedFrames()
        Returns:
        True if this buffer has received any input frames.
      • getLastInputTimecode

        java.lang.Long getLastInputTimecode()
        Returns:
        The timecode of the last frame in the buffer, null if the buffer is empty or is marked to be cleared upon receiving the next frame.