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

Side by Side Diff: third_party/WebKit/LayoutTests/webaudio/audioparam-exponentialRampToValueAtTime.html

Issue 1377903002: Use frames instead of time for running AudioParam timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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
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 <title>Test AudioParam.exponentialRampToValueAtTime</title>
8 </head> 9 </head>
9 10
10 <body> 11 <body>
11 <div id="description"></div> 12 <div id="description"></div>
12 <div id="console"></div> 13 <div id="console"></div>
13 14
14 <script> 15 <script>
15 description("Test AudioParam exponentialRampToValueAtTime() functionality. "); 16 description("Test AudioParam exponentialRampToValueAtTime() functionality. ");
16 17
17 // Play a long DC signal out through an AudioGainNode, and call setValueAt Time() and 18 // Play a long DC signal out through an AudioGainNode, and call setValueAt Time() and
18 // exponentialRampToValueAtTime() at regular intervals to set the starting and ending values 19 // exponentialRampToValueAtTime() at regular intervals to set the starting and ending values
19 // for an exponential ramp. Each time interval has a ramp with a differen t starting and 20 // for an exponential ramp. Each time interval has a ramp with a differen t starting and
20 // ending value so that there is a discontinuity at each time interval bou ndary. The 21 // ending value so that there is a discontinuity at each time interval bou ndary. The
21 // discontinuity is for testing timing. Also, we alternate between an inc reasing and 22 // discontinuity is for testing timing. Also, we alternate between an inc reasing and
22 // decreasing ramp for each interval. 23 // decreasing ramp for each interval.
23 24
24 // Number of tests to run. 25 // Number of tests to run.
25 var numberOfTests = 100; 26 var numberOfTests = 100;
26 27
27 // Max allowed difference between the rendered data and the expected resul t. 28 // Max allowed difference between the rendered data and the expected resul t.
28 var maxAllowedError = 6.75e-4; 29 var maxAllowedError = 1.222e-5;
29 30
30 // The AudioGainNode starts with this value instead of the default value. 31 // The AudioGainNode starts with this value instead of the default value.
31 var initialValue = 100; 32 var initialValue = 100;
32 33
33 // Set the gain node value to the specified value at the specified time. 34 // Set the gain node value to the specified value at the specified time.
34 function setValue(value, time) 35 function setValue(value, time)
35 { 36 {
36 gainNode.gain.setValueAtTime(value, time); 37 gainNode.gain.setValueAtTime(value, time);
37 } 38 }
38 39
(...skipping 17 matching lines...) Expand all
56 57
57 } 58 }
58 59
59 runTest(); 60 runTest();
60 successfullyParsed = true; 61 successfullyParsed = true;
61 62
62 </script> 63 </script>
63 64
64 </body> 65 </body>
65 </html> 66 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698