SIGN IN SIGN UP

Replace locks by atomics in audio player

The audio output thread only reads samples from the buffer, and most of
the time, the audio receiver thread only writes samples to the buffer.
In these cases, using atomics avoids lock contention.

There are still corner cases where the audio receiver thread needs to
"read" samples (and drop them), so lock only in these cases.

PR #4572 <https://github.com/Genymobile/scrcpy/pull/4572>
R
Romain Vimont committed
cfa4f7e2f2ac867dd6d6278a48cc470e82d42f37
Parent: d47ecef