
When audio processors are enabled during tunneling, they must produce output immediately, ensuring that the timestamps of the output samples correspond to the input and that no additional samples are produced. This requirement is documented in the Javadoc of DefaultAudioSink. However, this alone doesn't guarantee all buffers are immediately written to the AudioTrack, because the AudioTrack writes are non-blocking and may need multiple attempts. When draining the audio sink at the end of the stream, we currently fail in this situation because we assert that the timestamp must be set (=the drain operation is a no-op). But this may not be true when the previous non-blocking write wasn't fully handled. We can fix this by saving the last timestamp and reusing it during draining. Issue: google/ExoPlayer#10847 PiperOrigin-RevId: 500943891
ExoPlayer library
The ExoPlayer library is split into multiple modules. See ExoPlayer's top level README for more information about the available library modules and how to use them.