Package com.google.android.exoplayer2.audio

## Class AudioRendererEventListener.EventDispatcher

- java.lang.Object
- - com.google.android.exoplayer2.audio.AudioRendererEventListener.EventDispatcher

- Enclosing interface:
    AudioRendererEventListener

      public static final class AudioRendererEventListener.EventDispatcher
      extends Object

  Dispatches events to an `AudioRendererEventListener`.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `EventDispatcher​(Handler handler, AudioRendererEventListener listener)` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `audioCodecError​(Exception audioCodecError)` | Invokes `AudioRendererEventListener.onAudioCodecError(Exception)`.
    `void` | `audioSinkError​(Exception audioSinkError)` | Invokes `AudioRendererEventListener.onAudioSinkError(Exception)`.
    `void` | `decoderInitialized​(String decoderName, long initializedTimestampMs, long initializationDurationMs)` | Invokes `AudioRendererEventListener.onAudioDecoderInitialized(String, long, long)`.
    `void` | `decoderReleased​(String decoderName)` | Invokes `AudioRendererEventListener.onAudioDecoderReleased(String)`.
    `void` | `disabled​(DecoderCounters counters)` | Invokes `AudioRendererEventListener.onAudioDisabled(DecoderCounters)`.
    `void` | `enabled​(DecoderCounters decoderCounters)` | Invokes `AudioRendererEventListener.onAudioEnabled(DecoderCounters)`.
    `void` | `inputFormatChanged​(Format format, DecoderReuseEvaluation decoderReuseEvaluation)` | Invokes `AudioRendererEventListener.onAudioInputFormatChanged(Format)`.
    `void` | `positionAdvancing​(long playoutStartSystemTimeMs)` | Invokes `AudioRendererEventListener.onAudioPositionAdvancing(long)`.
    `void` | `skipSilenceEnabledChanged​(boolean skipSilenceEnabled)` | Invokes `AudioRendererEventListener.onSkipSilenceEnabledChanged(boolean)`.
    `void` | `underrun​(int bufferSize, long bufferSizeMs, long elapsedSinceLastFeedMs)` | Invokes `AudioRendererEventListener.onAudioUnderrun(int, long, long)`.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### EventDispatcher

          public EventDispatcher​(@Nullable
                                 Handler handler,
                                 @Nullable
                                 AudioRendererEventListener listener)

      Parameters:
        `handler` - A handler for dispatching events, or null if events should not be dispatched.
        `listener` - The listener to which events should be dispatched, or null if events should not be dispatched.

  - ### Method Detail

    - #### enabled

          public void enabled​(DecoderCounters decoderCounters)

      Invokes `AudioRendererEventListener.onAudioEnabled(DecoderCounters)`.

    - #### decoderInitialized

          public void decoderInitialized​(String decoderName,
                                         long initializedTimestampMs,
                                         long initializationDurationMs)

      Invokes `AudioRendererEventListener.onAudioDecoderInitialized(String, long, long)`.

    - #### inputFormatChanged

          public void inputFormatChanged​(Format format,
                                         @Nullable
                                         DecoderReuseEvaluation decoderReuseEvaluation)

      Invokes `AudioRendererEventListener.onAudioInputFormatChanged(Format)`.

    - #### positionAdvancing

          public void positionAdvancing​(long playoutStartSystemTimeMs)

      Invokes `AudioRendererEventListener.onAudioPositionAdvancing(long)`.

    - #### underrun

          public void underrun​(int bufferSize,
                               long bufferSizeMs,
                               long elapsedSinceLastFeedMs)

      Invokes `AudioRendererEventListener.onAudioUnderrun(int, long, long)`.

    - #### decoderReleased

          public void decoderReleased​(String decoderName)

      Invokes `AudioRendererEventListener.onAudioDecoderReleased(String)`.

    - #### disabled

          public void disabled​(DecoderCounters counters)

      Invokes `AudioRendererEventListener.onAudioDisabled(DecoderCounters)`.

    - #### skipSilenceEnabledChanged

          public void skipSilenceEnabledChanged​(boolean skipSilenceEnabled)

      Invokes `AudioRendererEventListener.onSkipSilenceEnabledChanged(boolean)`.

    - #### audioSinkError

          public void audioSinkError​(Exception audioSinkError)

      Invokes `AudioRendererEventListener.onAudioSinkError(Exception)`.

    - #### audioCodecError

          public void audioCodecError​(Exception audioCodecError)

      Invokes `AudioRendererEventListener.onAudioCodecError(Exception)`.