Files
SpotiFLAC-Mobile/android/app
zarzet 5c513133f7 fix(android): size the media3 audio buffer for 2x speed
With AudioTrack playback parameters media3 sizes the PCM buffer for 8x
speed, about 3 s at normal speed. Once a song's end is in that buffer the
track is told to play out, so a song queued later (for example after a
seek near the end) made the handoff open a new AudioTrack with a short
gap. Size the buffer for 2x instead, a quarter of the size and still at
least the normal buffer's time up to 2x, above the app's 1.2x maximum.
Volume, speed and the session equalizer act after the buffer.

Add an instrumentation test that measures queued handoffs with an
analytics listener: audio tracks opened, underruns and total play time.
2026-11-08 00:17:44 +07:00
..