OLD | NEW |
1 <!doctype html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 <title>Test Oscillator Node: sawtooth</title> | 4 <title> |
| 5 Test Oscillator Node: sawtooth |
| 6 </title> |
5 <script src="../../resources/testharness.js"></script> | 7 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 8 <script src="../../resources/testharnessreport.js"></script> |
7 <script src="../resources/audit-util.js"></script> | 9 <script src="../resources/audit-util.js"></script> |
8 <script src="../resources/audit.js"></script> | 10 <script src="../resources/audit.js"></script> |
9 <script src="../resources/buffer-loader.js"></script> | 11 <script src="../resources/buffer-loader.js"></script> |
10 <script src="../resources/oscillator-testing.js"></script> | 12 <script src="../resources/oscillator-testing.js"></script> |
11 </head> | 13 </head> |
12 | |
13 <body> | 14 <body> |
14 <script> | 15 <script id="layout-test-code"> |
15 let audit = Audit.createTaskRunner(); | 16 let audit = Audit.createTaskRunner(); |
16 let tester = OscillatorTestingUtils; | 17 let tester = OscillatorTestingUtils; |
17 | 18 |
18 audit.define("test", (task, should) => { | 19 audit.define('test', (task, should) => { |
19 let context = new OfflineAudioContext(1, tester.sampleRate * | 20 let context = new OfflineAudioContext( |
20 tester.lengthInSeconds, tester.sampleRate); | 21 1, tester.sampleRate * tester.lengthInSeconds, tester.sampleRate); |
21 | 22 |
22 // The thresholds are experimentally determined. | 23 // The thresholds are experimentally determined. |
23 tester.setThresholds({ | 24 tester.setThresholds({snr: 92.858, maxDiff: 0.0001}); |
24 snr: 92.858, | 25 tester.runTest( |
25 maxDiff: 0.0001 | 26 context, 'sawtooth', 'Sawtooth Oscillator with Exponential Sweep', |
26 }); | 27 task, should); |
27 tester.runTest(context, "sawtooth", | |
28 "Sawtooth Oscillator with Exponential Sweep", task, should); | |
29 }); | 28 }); |
30 | 29 |
31 audit.run(); | 30 audit.run(); |
32 </script> | 31 </script> |
33 </body> | 32 </body> |
34 </html> | 33 </html> |
OLD | NEW |