Stop using AudioRendererSinkCache for AudioRendererMixerManager.
This is part 3/4 CLs to move the <audio>/<video> elements off of a synchronous API that can lead to renderer hangs and premature audio renderer errors. This moves the AudioRendererSinkCache from AudioRendererMixerManger to a base::NoDestructor instance in AudioDeviceFactory and stops ARMM from using the cache at all. The users remaining are WebAudio and WebRTC, we can reevaluate metrics on keeping it after. Due to base::(SingleThread|Sequenced)TaskRunner::Get() being deprecated for content/ I've had to switch to use base::PostTask to generate a cleanup task runner. Unfortunately this doesn't guarantee that it runs on the render thread, but since we're now using a static instance, we can just always use base::Unretained and drop the WeakPtr factory that was handling the cancellation of these tasks. There's no point in the cache for ARMM since we're going to require a sink to get a mixer. That sink will always be used to get output device info first too and then reused for the mixer. BUG=905506 TEST=updated tests, compiles. R=olka Change-Id: I03408753f974e4c6fb9c89270508e26689162002 Reviewed-on: https://chromium-review.googlesource.com/c/1347730 Commit-Queue: Dale Curtis <dalecurtis@chromium.org> Reviewed-by:Olga Sharonova <olka@chromium.org> Cr-Commit-Position: refs/heads/master@{#612460}
Showing
This diff is collapsed.
Please register or sign in to comment