Added in API level 23

Callback


abstract class Callback
kotlin.Any
   ↳ android.media.MediaSync.Callback

MediaSync callback interface. Used to notify the user asynchronously of various MediaSync events.

Summary

Public constructors

Public methods
abstract Unit
onAudioBufferConsumed(sync: MediaSync, audioBuffer: ByteBuffer, bufferId: Int)

Called when returning an audio buffer which has been consumed.

Public constructors

Callback

Callback()

Public methods

onAudioBufferConsumed

Added in API level 23
abstract fun onAudioBufferConsumed(
    sync: MediaSync,
    audioBuffer: ByteBuffer,
    bufferId: Int
): Unit

Called when returning an audio buffer which has been consumed.

Parameters
sync MediaSync: The MediaSync object. This value cannot be null.
audioBuffer ByteBuffer: The returned audio buffer. This value cannot be null.
bufferId Int: The ID associated with audioBuffer as passed into MediaSync.queueAudio.