New issue
Advanced search Search tips

Issue 771306 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Oct 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebAudio oscillator sweep tests fail

Project Member Reported by rtoy@chromium.org, Oct 3 2017

Issue description

When running Webaudio oscillator sweep tests on upcoming Goobuntu, the oscillator sweep tests fail.  The SNR is reduced from about 90+ dB to 80 dB.  While 80 dB is probably ok, this is a surprising change from just updating the OS.
 

Comment 1 by rtoy@chromium.org, Oct 3 2017

The issue is that there were a few accuracy fixes in powf between the two versions (glibc 2.19 vs 2.24). This is used in exponentialRampToValueAtTime to get the exponential ramp values. These values are then used in the oscillator to increment a phase index.  Hence, any differences will get propagated forever.
Project Member

Comment 2 by bugdroid1@chromium.org, Oct 3 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6

commit a3cac15f5f6abbe7217bd264c4635c6b92a93aa6
Author: Raymond Toy <rtoy@chromium.org>
Date: Tue Oct 03 23:37:37 2017

Use pow instead of powf in exponential ramp

To work better with the upcoming Goobuntu system, change powf to pow
in the exponential ramp code.  There are slight differences between
the two OS libc versions in powf.  Since the oscillator accumulates
the phase index based on the exponential results, any differences
between the two versions gets propagated forever.  Use pow (double
precision) to compute the required value and convert to
single precision.  This should minimize the difference between OSes.

Bug:  771306 
Test: osc-sawtooth-sweep-snr.html, osc-sine-sweep-snr.html, osc-square-sweep-snr.html, osc-triangle-sweep-snr.html, osc-custom-sweep-snr.html
Change-Id: I3efbb75a7905cbd1630d0fe429ad328e48bd061a
Reviewed-on: https://chromium-review.googlesource.com/695666
Reviewed-by: Hongchan Choi <hongchan@chromium.org>
Commit-Queue: Raymond Toy <rtoy@chromium.org>
Cr-Commit-Position: refs/heads/master@{#506230}
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/AudioParam/audioparam-setValueCurve-end.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-custom-sweep-snr.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sawtooth-sweep-snr.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-sine-sweep-snr.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-square-sweep-snr.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-triangle-sweep-snr.html
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-custom-expected.wav
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-sawtooth-expected.wav
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-sine-expected.wav
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-square-expected.wav
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/LayoutTests/webaudio/Oscillator/oscillator-triangle-expected.wav
[modify] https://crrev.com/a3cac15f5f6abbe7217bd264c4635c6b92a93aa6/third_party/WebKit/Source/modules/webaudio/AudioParamTimeline.cpp

Comment 3 by rtoy@chromium.org, Oct 4 2017

Status: Verified (was: Started)
Tested on test machine with upcoming OS.  Tests pass.

Sign in to add a comment