Interface AudioTrackExecutor

    • Method Detail

      • getAudioBuffer

        AudioFrameBuffer getAudioBuffer()
        Returns:
        The audio buffer of this executor.
      • execute

        void execute​(TrackStateListener listener)
        Execute the track, which means that this thread will fill the frame buffer until the track finishes or is stopped.
        Parameters:
        listener - Listener for track state events
      • stop

        void stop()
        Stop playing the track, terminating the thread that is filling the frame buffer. Subsequent playback requires a new executor.
      • getPosition

        long getPosition()
        Returns:
        Timecode of the last played frame or in case a seek is in progress, the timecode of the frame being seeked to.
      • setPosition

        void setPosition​(long timecode)
        Perform seek to the specified timecode.
        Parameters:
        timecode - The timecode in milliseconds
      • getState

        AudioTrackState getState()
        Returns:
        Current state of the executor
      • setMarker

        void setMarker​(TrackMarker marker)
        Set the track position marker. This will clear all existing markers.
        Parameters:
        marker - Track position marker to set.
      • addMarker

        void addMarker​(TrackMarker marker)
        Adds a marker to the track. Markers can be used to execute code when the track reaches a certain position.
        Parameters:
        marker - The marker to add.
      • removeMarker

        void removeMarker​(TrackMarker marker)
        Removes a marker from the track.
        Parameters:
        marker - The marker to remove.
      • failedBeforeLoad

        boolean failedBeforeLoad()
        Returns:
        True if this track threw an exception before it provided any audio.