Interface AudioFrameProvider

    • Method Detail

      • provide

        AudioFrame provide()
        Returns:
        Provided frame, or null if none available
      • provide

        AudioFrame provide​(long timeout,
                           java.util.concurrent.TimeUnit unit)
                    throws java.util.concurrent.TimeoutException,
                           java.lang.InterruptedException
        Parameters:
        timeout - Specifies the maximum time to wait for data. Pass 0 for non-blocking mode.
        unit - Specifies the time unit of the maximum wait time.
        Returns:
        Provided frame. In case wait time is above zero, null indicates that no data is not available at the current moment, otherwise null means the end of the track.
        Throws:
        java.util.concurrent.TimeoutException - When wait time is above zero, but no track info is found in that time.
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).
      • provide

        boolean provide​(MutableAudioFrame targetFrame)
        Parameters:
        targetFrame - Frame to update with the details and data of the provided frame.
        Returns:
        true if a frame was provided.
      • provide

        boolean provide​(MutableAudioFrame targetFrame,
                        long timeout,
                        java.util.concurrent.TimeUnit unit)
                 throws java.util.concurrent.TimeoutException,
                        java.lang.InterruptedException
        Parameters:
        targetFrame - Frame to update with the details and data of the provided frame.
        timeout - Timeout.
        unit - Time unit for the timeout value.
        Returns:
        true if a frame was provided.
        Throws:
        java.util.concurrent.TimeoutException - If no frame became available within the timeout.
        java.lang.InterruptedException - When interrupted externally (or for seek/stop).