• Raymond Toy's avatar
    Handle k-rate AudioParam inputs for PannerNode · 7e979350
    Raymond Toy authored
    As with other fixes, use HasSampleAccurateValuesTimeline() to determine
    if there are sample-accurate values which is either caused by timeline
    events or connected inputs to the AudioParam.  Added IsAudioRate() if
    any AudioParam is k-rate and use that to determine how to handle the
    AudioParam.
    
    This applies to the 6 AudioParams of a PannerNode, and the 9 AudioParams
    for an AudioListener since they're closely coupled.
    
    Performance impact is negligible, based on Spotify's benchmark.
    
    Without this CL (macbook pro):
    TEST	                μs	MIN	Q1	MEDIAN	Q3	MAX
    Baseline	        495	495	530	550	556	1765
    Panner-equalpower	359	359	377	395	399	1186
    Panner-HRTF	        948	948	1023	1119	1135	7163
    
    With this CL:
    TEST	                μs	MIN	Q1	MEDIAN	Q3	MAX
    Baseline	        496	496	545	558	578	8654
    Panner-equalpower	359	359	377	395	399	611
    Panner-HRTF	        941	941	1021	1119	1134	8270
    
    Bug: 1015760
    Change-Id: Iea0ef37ae07c7113c8ab9cc3e1cb47e6179a151e
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2096786
    Commit-Queue: Raymond Toy <rtoy@chromium.org>
    Reviewed-by: default avatarHongchan Choi <hongchan@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#756259}
    7e979350
audio_param.cc 19.6 KB