• Thomas Guilbert's avatar
    Wait for AAudio state changes · 9503b61e
    Thomas Guilbert authored
    From certain crash reports, it appears that we are getting calls to
    OnAudioDataRequestedCallback() after destroying AAudioOutputStream. This
    shouldn't happen, but there might be underlying issues in AAudio.
    
    This CL waits for our AAudio stream to transition to a target state,
    before allowing the stream to be destroyed. This means waiting for
    STOPPED and CLOSED when stopping and closing.
    
    Change-Id: I0e7fb332a1da9b4709a14b3206503be8434af534
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2340061Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
    Commit-Queue: Thomas Guilbert <tguilbert@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#796127}
    9503b61e
aaudio_output.cc 8.31 KB