addSink

open override fun addSink(sink: AudioTrackSink)

Adds a sink that receives the audio bytes and related information for this audio track. Repeated calls using the same sink will only add the sink once.

Implementations should copy the audio data into a local copy if they wish to use the data after the AudioTrackSink.onData callback returns. Long running processing of the received audio data should be done in a separate thread, as doing so inline may block the audio thread.