[AudioService] OutputController snooping always on realtime thread.
Remove separate Snoopable modes "deferred" versus "realtime" and just give all Snoopers access to the audio data in realtime, without any copying or thread-hopping. This is to mitigate audio glitches when using loopback on low-end machines that are CPU-limited, where normal priority threads do not run their tasks often enough. Moved the special "SanitizeAudioBus()" function closer to where it is being used, with a simple "modify only if needed" mechanism. This function was clamping the audio samples; but, by being in audio::OutputController, this would mutate the audio data being delivered to both the operating system as well as other Snoopers. Bug: 960161 Change-Id: If91952462960f7c72562436ffeebb64498b5372f Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1602312 Commit-Queue: Yuri Wiitala <miu@chromium.org> Auto-Submit: Yuri Wiitala <miu@chromium.org> Reviewed-by:Max Morin <maxmorin@chromium.org> Cr-Commit-Position: refs/heads/master@{#658304}
Showing
Please register or sign in to comment