AudioRendererEventListener.EventDispatcher


class AudioRendererEventListener.EventDispatcher


Dispatches events to an AudioRendererEventListener.

Summary

Public constructors

Public functions

Unit
audioCodecError(audioCodecError: Exception!)

Invokes onAudioCodecError.

Unit
audioSinkError(audioSinkError: Exception!)

Invokes onAudioSinkError.

Unit

Invokes onAudioTrackInitialized.

Unit

Invokes onAudioTrackReleased.

Unit
decoderInitialized(
    decoderName: String!,
    initializedTimestampMs: Long,
    initializationDurationMs: Long
)

Invokes onAudioDecoderInitialized.

Unit
decoderReleased(decoderName: String!)

Invokes onAudioDecoderReleased.

Unit

Invokes onAudioDisabled.

Unit
enabled(decoderCounters: DecoderCounters!)

Invokes onAudioEnabled.

Unit
inputFormatChanged(
    format: Format!,
    decoderReuseEvaluation: DecoderReuseEvaluation?
)

Invokes onAudioInputFormatChanged.

Unit
positionAdvancing(playoutStartSystemTimeMs: Long)

Invokes onAudioPositionAdvancing.

Unit
skipSilenceEnabledChanged(skipSilenceEnabled: Boolean)

Invokes onSkipSilenceEnabledChanged.

Unit
underrun(bufferSize: Int, bufferSizeMs: Long, elapsedSinceLastFeedMs: Long)

Invokes onAudioUnderrun.

Public constructors

EventDispatcher

EventDispatcher(handler: Handler?, listener: AudioRendererEventListener?)
Parameters
handler: Handler?

A handler for dispatching events, or null if events should not be dispatched.

listener: AudioRendererEventListener?

The listener to which events should be dispatched, or null if events should not be dispatched.

Public functions

audioCodecError

fun audioCodecError(audioCodecError: Exception!): Unit

Invokes onAudioCodecError.

audioSinkError

fun audioSinkError(audioSinkError: Exception!): Unit

Invokes onAudioSinkError.

audioTrackInitialized

fun audioTrackInitialized(audioTrackConfig: AudioSink.AudioTrackConfig!): Unit

Invokes onAudioTrackInitialized.

audioTrackReleased

fun audioTrackReleased(audioTrackConfig: AudioSink.AudioTrackConfig!): Unit

Invokes onAudioTrackReleased.

decoderInitialized

fun decoderInitialized(
    decoderName: String!,
    initializedTimestampMs: Long,
    initializationDurationMs: Long
): Unit

Invokes onAudioDecoderInitialized.

decoderReleased

fun decoderReleased(decoderName: String!): Unit

Invokes onAudioDecoderReleased.

disabled

fun disabled(counters: DecoderCounters!): Unit

Invokes onAudioDisabled.

enabled

fun enabled(decoderCounters: DecoderCounters!): Unit

Invokes onAudioEnabled.

inputFormatChanged

fun inputFormatChanged(
    format: Format!,
    decoderReuseEvaluation: DecoderReuseEvaluation?
): Unit

Invokes onAudioInputFormatChanged.

positionAdvancing

fun positionAdvancing(playoutStartSystemTimeMs: Long): Unit

Invokes onAudioPositionAdvancing.

skipSilenceEnabledChanged

fun skipSilenceEnabledChanged(skipSilenceEnabled: Boolean): Unit

Invokes onSkipSilenceEnabledChanged.

underrun

fun underrun(bufferSize: Int, bufferSizeMs: Long, elapsedSinceLastFeedMs: Long): Unit

Invokes onAudioUnderrun.