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

Side by Side Diff: LayoutTests/webaudio/audioparam-setValueCurveAtTime.html

Issue 1277443005: Use interpolation for setValueCurveAtTime (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Corrected test thresholds and results Created 5 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | LayoutTests/webaudio/audioparam-setValueCurveAtTime-interpolation.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <html> 2 <html>
3 <head> 3 <head>
4 <script src="resources/compatibility.js"></script> 4 <script src="resources/compatibility.js"></script>
5 <script src="resources/audio-testing.js"></script> 5 <script src="resources/audio-testing.js"></script>
6 <script src="resources/audioparam-testing.js"></script> 6 <script src="resources/audioparam-testing.js"></script>
7 <script src="../resources/js-test.js"></script> 7 <script src="../resources/js-test.js"></script>
8 </head> 8 </head>
9 9
10 <body> 10 <body>
11 <div id="description"></div> 11 <div id="description"></div>
12 <div id="console"></div> 12 <div id="console"></div>
13 13
14 <script> 14 <script>
15 description("Test AudioParam setValueCurveAtTime() functionality."); 15 description("Test AudioParam setValueCurveAtTime() functionality.");
16 16
17 // Play a long DC signal out through an AudioGainNode and for each time interval call 17 // Play a long DC signal out through an AudioGainNode and for each time interval call
18 // setValueCurveAtTime() to set the values for the duration of the interval. Ea ch curve is a sine 18 // setValueCurveAtTime() to set the values for the duration of the interval. Ea ch curve is a sine
19 // wave, and we assume that the time interval is not an exact multiple of the pe riod. This causes a 19 // wave, and we assume that the time interval is not an exact multiple of the pe riod. This causes a
20 // discontinuity between time intervals which is used to test timing. 20 // discontinuity between time intervals which is used to test timing.
21 21
22 // Number of tests to run. 22 // Number of tests to run.
23 var numberOfTests = 20; 23 var numberOfTests = 20;
24 24
25 // Max allowed difference between the rendered data and the expected result. (T he error is zero 25 // Max allowed difference between the rendered data and the expected result. Be cause of the linear
26 // because the rendered curve should really be exactly the same as the reference .) 26 // interpolation, the rendered curve isn't exactly the same as the reference. T his value is
27 var maxAllowedError = 0; 27 // experimentally determined.
28 var maxAllowedError = 4.657e-10;
28 29
29 // The amplitude of the sine wave. 30 // The amplitude of the sine wave.
30 var sineAmplitude = 1; 31 var sineAmplitude = 1;
31 32
32 // Frequency of the sine wave. 33 // Frequency of the sine wave.
33 var freqHz = 440; 34 var freqHz = 440;
34 35
35 // Curve to use for setValueCurveAtTime(). 36 // Curve to use for setValueCurveAtTime().
36 var curve; 37 var curve;
37 38
(...skipping 27 matching lines...) Expand all
65 2 * Math.PI * sineAmplitude * freqHz / sampleRate); 66 2 * Math.PI * sineAmplitude * freqHz / sampleRate);
66 } 67 }
67 68
68 runTest(); 69 runTest();
69 successfullyParsed = true; 70 successfullyParsed = true;
70 71
71 </script> 72 </script>
72 73
73 </body> 74 </body>
74 </html> 75 </html>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/webaudio/audioparam-setValueCurveAtTime-interpolation.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698