public static interface MediaCodecAudioTrackRenderer.EventListener extends MediaCodecTrackRenderer.EventListener
MediaCodecAudioTrackRenderer
events.Modifier and Type | Method and Description |
---|---|
void |
onAudioTrackInitializationError(AudioTrack.InitializationException e)
Invoked when an
AudioTrack fails to initialize. |
void |
onAudioTrackUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
Invoked when an
AudioTrack underrun occurs. |
void |
onAudioTrackWriteError(AudioTrack.WriteException e)
Invoked when an
AudioTrack write fails. |
onCryptoError, onDecoderInitializationError, onDecoderInitialized
void onAudioTrackInitializationError(AudioTrack.InitializationException e)
AudioTrack
fails to initialize.e
- The corresponding exception.void onAudioTrackWriteError(AudioTrack.WriteException e)
AudioTrack
write fails.e
- The corresponding exception.void onAudioTrackUnderrun(int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)
AudioTrack
underrun occurs.bufferSize
- The size of the AudioTrack
's buffer, in bytes.bufferSizeMs
- The size of the AudioTrack
's buffer, in milliseconds, if it is
configured for PCM output. -1 if it is configured for passthrough output, as the buffered
media can have a variable bitrate so the duration may be unknown.elapsedSinceLastFeedMs
- The time since the AudioTrack
was last fed data.