3 ms·
tl;dr. The root cause for their issue was this: > The Android thread scheduler changes the behavior of threads depending whether or not an application is runni
by 29athrowaway 6y ago
tl;dr. The root cause for their issue was this:
> The Android thread scheduler changes the behavior of threads depending whether or not an application is running in the foreground or the background. Threads in the background are assigned an extra 40 ms (40000000 ns) of wait time.
> A bug deep in the plumbing of Android itself meant this extra timer value was retained when the thread moved to the foreground. Usually the audio handler thread was created while the application was in the foreground, but sometimes the thread was created a little sooner, while Ninja was still in the background. When this happened, playback would stutter.