Chromium Code Reviews| Index: third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html |
| diff --git a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html |
| index 32be9c3e5c37a767b9ac42afc2d7a43a54a00e50..3bb552bfb4e386bc019bdc84e0990d0acb1a2ce8 100644 |
| --- a/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html |
| +++ b/third_party/WebKit/LayoutTests/webaudio/Oscillator/osc-negative-freq.html |
| @@ -10,9 +10,13 @@ |
| <body> |
| <script> |
| - // Some arbitrary sample rate for the offline context. |
| - var sampleRate = 48000; |
| - var renderDuration = 1; |
| + // Some arbitrary sample rate for the offline context. But it MUST be |
| + // at least twice the oscillator frequency that we're using for the |
| + // test. (Currently 440 Hz.) |
| + var sampleRate = 16000; |
| + // A failyr arbitrary duration that should have at least 1-2 sample |
|
hongchan
2017/03/16 21:46:09
Can we add one empty line before l.17?
Raymond Toy
2017/03/16 22:13:12
Done. And fixed the typo. :-)
|
| + // periods of the oscillator (at a nominal 440 Hz). |
| + var renderDuration = 0.1; |
| var renderFrames = renderDuration * sampleRate; |
| var audit = Audit.createTaskRunner(); |
| @@ -21,7 +25,7 @@ |
| runTest({ |
| message: "Sum of positive and negative frequency sine oscillators", |
| type: "sine", |
| - threshold: 4.7684e-7 |
| + threshold: 3.5763e-7 |
| }).then(done); |
| }); |
| @@ -29,7 +33,7 @@ |
| runTest({ |
| message: "Sum of positive and negative frequency square oscillators", |
| type: "square", |
| - threshold: 4.4108e-6 |
| + threshold: 1.4753e-6 |
| }).then(done); |
| }); |
| @@ -37,7 +41,7 @@ |
| runTest({ |
| message: "Sum of positive and negative frequency sawtooth oscillators", |
| type: "sawtooth", |
| - threshold: 4.3735e-6 |
| + threshold: 1.4753e-6 |
| }).then(done); |
| }); |
| @@ -45,7 +49,7 @@ |
| runTest({ |
| message: "Sum of positive and negative frequency triangle oscillators", |
| type: "triangle", |
| - threshold: 3.5763e-7 |
| + threshold: 2.9803e-7 |
| }).then(done); |
| }); |
| @@ -60,7 +64,7 @@ |
| startFrequency: 440, |
| endFrequency: sampleRate / 4 |
| }, |
| - threshold: 4.1202e-6 |
| + threshold: 1.2070e-6 |
| }).then(done); |
| }); |
| @@ -138,7 +142,7 @@ |
| actual, { |
| precision: 6 |
| }) |
| - .beCloseToArray(expected, 4.7684e-7); |
| + .beCloseToArray(expected, 3.5763e-7); |
| }).then(done); |
| }); |