• Raymond Toy's avatar
    PannerNode implements custom ProcessIfNecessary · 3185e038
    Raymond Toy authored
    When setting the panning model, the Panner object gets replaced with
    a new Panner for the new panning model.  This happens with the process
    lock.  However, in AudioNode::ProcessIfNecessary, there is a call to
    PropagatesSilence() that calls TailTime() and LatencyTime() in the
    audio thread and this is not covered by the process lock. Hence
    TailTime() may get called on a destroyed Panner object.
    
    So let PannerNode implement its own ProcessIfNecessary method to
    add a process lock to protect PropagatesSilence (and thus
    TailTime/LatencyTime). This requires making ProcessIfNecessary virtual,
    and requires making a few member variables protected instead of
    private.
    
    
    Bug: 1023817
    Change-Id: Icc850d9f8b952814c40c29912cdec3d25d6f4ae2
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1924718Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
    Commit-Queue: Raymond Toy <rtoy@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#717029}
    3185e038
audio_node.h 16.7 KB