Interface TrackStateListener
-
- All Known Implementing Classes:
DefaultAudioPlayer
public interface TrackStateListenerListener of track execution events.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidonTrackException(AudioTrack track, FriendlyException exception)Called when an exception occurs while a track is playing or loading.voidonTrackStuck(AudioTrack track, long thresholdMs)Called when an exception occurs while a track is playing or loading.
-
-
-
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 occurredexception- 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 occurredthresholdMs- The wait threshold that was exceeded for this event to trigger
-
-