public interface AudioRendererEventListener
Renderer events.| Modifier and Type | Interface and Description |
|---|---|
static class |
AudioRendererEventListener.EventDispatcher
Dispatches events to a
AudioRendererEventListener. |
| Modifier and Type | Method and Description |
|---|---|
void |
onAudioDecoderInitialized(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
Called when a decoder is created.
|
void |
onAudioDisabled(DecoderCounters counters)
Called when the renderer is disabled.
|
void |
onAudioEnabled(DecoderCounters counters)
Called when the renderer is enabled.
|
void |
onAudioInputFormatChanged(Format format)
Called when the format of the media being consumed by the renderer changes.
|
void |
onAudioSessionId(int audioSessionId)
Called when the audio session is set.
|
void |
onAudioSinkUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
Called when an
AudioSink underrun occurs. |
void onAudioEnabled(DecoderCounters counters)
counters - DecoderCounters that will be updated by the renderer for as long as it
remains enabled.void onAudioSessionId(int audioSessionId)
audioSessionId - The audio session id.void onAudioDecoderInitialized(java.lang.String decoderName,
long initializedTimestampMs,
long initializationDurationMs)
decoderName - The decoder that was created.initializedTimestampMs - SystemClock.elapsedRealtime() when initialization
finished.initializationDurationMs - The time taken to initialize the decoder in milliseconds.void onAudioInputFormatChanged(Format format)
format - The new format.void onAudioSinkUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
AudioSink underrun occurs.bufferSize - The size of the AudioSink's buffer, in bytes.bufferSizeMs - The size of the AudioSink's buffer, in milliseconds, if it is
configured for PCM output. C.TIME_UNSET 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 AudioSink was last fed data.void onAudioDisabled(DecoderCounters counters)
counters - DecoderCounters that were updated by the renderer.