When suspending context, don't clear handlers
AudioContext.suspend() would call StopRendering(). This stops the audio thread from pulling the graph (eventually) but it also clears out any handlers, including those associated with automatic pull nodes for any AnalyserNode that isn't connected to the destination. When the context is resumed, the AnalyserNode isn't pulled anymore, so the output never changes. Add a SuspendRendering() method to handle AudioContext.suspend() which doesn't clear the handlers. Then when the context is resumed, AnalyserNodes will get pulled again. Then StopRendering() is used only for AudioContext.close() where it is ok to clear out the handlers since we can't resume a closed context. Bug: 1018499 Change-Id: I4b4ccf688b37e6b81d310d2596cfff9603048876 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1903894Reviewed-by:Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#723609}
Showing
Please register or sign in to comment