Interface TrackStateListener

  • All Known Implementing Classes:
    DefaultAudioPlayer

    public interface TrackStateListener
    Listener of track execution events.
    • Method Detail

      • onTrackException

        void onTrackException​(AudioTrack track,
                              FriendlyException exception)
        Called when an exception occurs while a track is playing or loading. This is always fatal, but it may have left some data in the audio buffer which can still play until the buffer clears out.
        Parameters:
        track - The audio track for which the exception occurred
        exception - The exception that occurred
      • onTrackStuck

        void onTrackStuck​(AudioTrack track,
                          long thresholdMs)
        Called when an exception occurs while a track is playing or loading. This is always fatal, but it may have left some data in the audio buffer which can still play until the buffer clears out.
        Parameters:
        track - The audio track for which the exception occurred
        thresholdMs - The wait threshold that was exceeded for this event to trigger