public static interface AudioTrack.Listener
| Modifier and Type | Method and Description |
|---|---|
void |
onAudioSessionId(int audioSessionId)
Called when the audio track has been initialized with a newly generated audio session id.
|
void |
onPositionDiscontinuity()
Called when the audio track 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 track underruns.
|
void onAudioSessionId(int audioSessionId)
audioSessionId - The newly generated audio session id.void onPositionDiscontinuity()
void onUnderrun(int bufferSize,
long bufferSizeMs,
long elapsedSinceLastFeedMs)
bufferSize - The size of the track's buffer, in bytes.bufferSizeMs - The size of the track'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 track was last fed data, in milliseconds.