• Raymond Toy's avatar
    Add to rendering orphan handlers when destination is running. · 8ce80308
    Raymond Toy authored
    Continue to add to the rendering orphan handlers list if the
    destination is still rendering.
    
    If the destination is requested to stop, set a flag so that the
    rendering won't pull on the audio graph anymore, even if the
    audio device is still running and requesting data.
    
    In the test case from the bug, we were not adding the handlers to the
    list because the context was closed.  However, the destination was
    still running because the audio device wasn't stopped yet. In the test,
    the handlers were being destroyed at the same time as the audio thread
    was accessing the handlers to render audio.
    
    Bug: 1003807, 1017961
    Change-Id: I87052c8504c5698d71f041e6d4305cf42851f067
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1879784Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
    Commit-Queue: Raymond Toy <rtoy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#712666}
    8ce80308
audio_context.cc 24.3 KB