OLD | NEW |
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/testharness.js"></script> | 4 <script src="../../resources/testharness.js"></script> |
5 <script src="../../resources/testharnessreport.js"></script> | 5 <script src="../../resources/testharnessreport.js"></script> |
6 <script src="../resources/audit-util.js"></script> | 6 <script src="../resources/audit-util.js"></script> |
7 <script src="../resources/audit.js"></script> | 7 <script src="../resources/audit.js"></script> |
8 <script src="../resources/audioparam-testing.js"></script> | 8 <script src="../resources/audioparam-testing.js"></script> |
9 <title>Test AudioParam.setValueCurveAtTime</title> | 9 <title>Test AudioParam.setValueCurveAtTime</title> |
10 </head> | 10 </head> |
(...skipping 23 matching lines...) Expand all Loading... |
34 let freqHz = 440; | 34 let freqHz = 440; |
35 | 35 |
36 // Curve to use for setValueCurveAtTime(). | 36 // Curve to use for setValueCurveAtTime(). |
37 let curve; | 37 let curve; |
38 | 38 |
39 // Sets the curve data for the entire time interval. | 39 // Sets the curve data for the entire time interval. |
40 function automation(value, startTime, endTime) { | 40 function automation(value, startTime, endTime) { |
41 gainNode.gain.setValueCurveAtTime(curve, startTime, endTime - startTime); | 41 gainNode.gain.setValueCurveAtTime(curve, startTime, endTime - startTime); |
42 } | 42 } |
43 | 43 |
44 audit.define('test', function(task, should) { | 44 audit.define({ |
45 task.describe('AudioParam setValueCurveAtTime() functionality.'); | 45 label: 'test', |
| 46 description: 'AudioParam setValueCurveAtTime() functionality.' |
| 47 }, function(task, should) { |
46 // The curve of values to use. | 48 // The curve of values to use. |
47 curve = createSineWaveArray(timeInterval, freqHz, sineAmplitude, sampleRate); | 49 curve = createSineWaveArray(timeInterval, freqHz, sineAmplitude, sampleRate); |
48 | 50 |
49 createAudioGraphAndTest( | 51 createAudioGraphAndTest( |
50 task, should, numberOfTests, sineAmplitude, | 52 task, should, numberOfTests, sineAmplitude, |
51 function(k) { | 53 function(k) { |
52 // Don't need to set the value. | 54 // Don't need to set the value. |
53 }, | 55 }, |
54 automation, 'setValueCurveAtTime()', maxAllowedError, | 56 automation, 'setValueCurveAtTime()', maxAllowedError, |
55 createReferenceSineArray, | 57 createReferenceSineArray, |
56 2 * Math.PI * sineAmplitude * freqHz / sampleRate, differenceErrorMetric); | 58 2 * Math.PI * sineAmplitude * freqHz / sampleRate, differenceErrorMetric); |
57 }); | 59 }); |
58 | 60 |
59 audit.run(); | 61 audit.run(); |
60 </script> | 62 </script> |
61 | 63 |
62 </body> | 64 </body> |
63 </html> | 65 </html> |
OLD | NEW |