Add mutex for allowing the graph to be pulled
Basically add a mutex to protect access to allow_pulling_audio_graph_. The main thread waits until it has the lock before setting this. This prevents the main thread from deleting things while the audio thread is pulling on the graph. A try lock is used so as not to block the audio thread if it can't get lock. This is applied to both real time and offline contexts which required moving the original real-time-only implementation to audio_destination_node so we can use the same methods for the offline context. Tested the repro case from 1125635, and the issue does not reproduce. We're assuming this will fix 1115901, but I've not been able to reproduce that locally. Bug: 1125635, 1115901 Change-Id: I1037d8c44225c6dcc8fe906c29a5a86740a15e1d Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2410743Reviewed-by:Hongchan Choi <hongchan@chromium.org> Commit-Queue: Raymond Toy <rtoy@chromium.org> Cr-Commit-Position: refs/heads/master@{#809393}
Showing
Please register or sign in to comment