public static interface AudioSink.Listener
| Modifier and Type | Method and Description |
|---|---|
void |
onAudioSessionId(int audioSessionId)
Called if the audio sink has started rendering audio to a new platform audio session.
|
void |
onPositionDiscontinuity()
Called when the audio sink handles a buffer whose timestamp is discontinuous with the last
buffer handled since it was reset.
|
void |
onUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
Called when the audio sink runs out of data.
|
void onAudioSessionId(int audioSessionId)
audioSessionId - The newly generated audio session's identifier.void onPositionDiscontinuity()
void onUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
An audio sink implementation may never call this method (for example, if audio data is consumed in batches rather than based on the sink's own clock).
bufferSize - The size of the sink's buffer, in bytes.bufferSizeMs - The size of the sink's buffer, in milliseconds, if it is configured for
PCM output. C.TIME_UNSET if it is configured for encoded audio output, as the
buffered media can have a variable bitrate so the duration may be unknown.elapsedSinceLastFeedMs - The time since the sink was last fed data, in milliseconds.