• sigbjornf's avatar
    Avoid AudioBufferSourceHandler data race. · 7ad07b8c
    sigbjornf authored
    Following r478084, the main thread may contend with the audio thread
    on accessing AudioBufferSourceNodeHandler's mutable state. Coordinate
    such access by introducing a Mutex over |min_playback_rate_|.
    
    Using atomic ops would be the natural choice for handling this, but
    steering clear of those over doubles (cf. https://crrev.com/1256053006)
    until std::atomic<> is allowed.
    
    R=haraken,hongchan
    BUG=731568
    
    Review-Url: https://codereview.chromium.org/2929283002
    Cr-Commit-Position: refs/heads/master@{#478679}
    7ad07b8c
AudioBufferSourceNode.h 8.16 KB