Don't allocate on audio thread and align work arrays
In WaveShaperCurveValues(), there are 5 work arrays that used to be allocated on the audio thread. Move these to the class so we don't do that anymore. And while we're at it, make them AudioFloatArray's so they're appropriately aligned for best SIMD/NEON performance. Running Spotify's Web Audio Benchmark shows that we get 10% improvement in speed for WaveShaper-1x, and about 3-4% for WaveShaper-2x and 4x. No functional changes; all tests pass. Bug: 1013118 Change-Id: Ide6340ee79d567068e0661abd0b20f14bb064166 Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2210821 Commit-Queue: Raymond Toy <rtoy@chromium.org> Reviewed-by:Hongchan Choi <hongchan@chromium.org> Cr-Commit-Position: refs/heads/master@{#771062}
Showing
Please register or sign in to comment