Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(26)

Side by Side Diff: LayoutTests/webaudio/resources/distance-model-testing.js

Issue 426633005: Bump up allowed maxAllowedError in webaudio tests. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 6 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 var sampleRate = 44100.0; 1 var sampleRate = 44100.0;
2 2
3 // How many panner nodes to create for the test. 3 // How many panner nodes to create for the test.
4 var nodesToCreate = 100; 4 var nodesToCreate = 100;
5 5
6 // Time step when each panner node starts. 6 // Time step when each panner node starts.
7 var timeStep = 0.001; 7 var timeStep = 0.001;
8 8
9 // Make sure we render long enough to get all of our nodes. 9 // Make sure we render long enough to get all of our nodes.
10 var renderLengthSeconds = timeStep * (nodesToCreate + 1); 10 var renderLengthSeconds = timeStep * (nodesToCreate + 1);
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 } 122 }
123 123
124 function checkDistanceResult(model) { 124 function checkDistanceResult(model) {
125 return function(event) { 125 return function(event) {
126 renderedBuffer = event.renderedBuffer; 126 renderedBuffer = event.renderedBuffer;
127 renderedData = renderedBuffer.getChannelData(0); 127 renderedData = renderedBuffer.getChannelData(0);
128 128
129 // The max allowed error between the actual gain and the expected 129 // The max allowed error between the actual gain and the expected
130 // value. This is determined experimentally. Set to 0 to see what 130 // value. This is determined experimentally. Set to 0 to see what
131 // the actual errors are. 131 // the actual errors are.
132 var maxAllowedError = 2.3e-6; 132 var maxAllowedError = 3.3e-6;
133 133
134 var success = true; 134 var success = true;
135 135
136 // Number of impulses we found in the rendered result. 136 // Number of impulses we found in the rendered result.
137 var impulseCount = 0; 137 var impulseCount = 0;
138 138
139 // Maximum relative error in the gain of the impulses. 139 // Maximum relative error in the gain of the impulses.
140 var maxError = 0; 140 var maxError = 0;
141 141
142 // Array of locations of the impulses that were not at the 142 // Array of locations of the impulses that were not at the
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
197 197
198 if (success) { 198 if (success) {
199 testPassed("Distance test passed for distance model " + model); 199 testPassed("Distance test passed for distance model " + model);
200 } else { 200 } else {
201 testFailed("Distance test failed for distance model " + model); 201 testFailed("Distance test failed for distance model " + model);
202 } 202 }
203 203
204 finishJSTest(); 204 finishJSTest();
205 } 205 }
206 } 206 }
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698