| OLD | NEW |
| 1 <!doctype html> | 1 <!doctype html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Test Oscillator Node: triangle</title> | 4 <title>Test Oscillator Node: triangle</title> |
| 5 <script src="../../resources/testharness.js"></script> |
| 6 <script src="../../resources/testharnessreport.js"></script> |
| 7 <script src="../resources/audit-util.js"></script> |
| 8 <script src="../resources/audit.js"></script> |
| 5 <script src="../resources/buffer-loader.js"></script> | 9 <script src="../resources/buffer-loader.js"></script> |
| 6 <script src="../../resources/js-test.js"></script> | |
| 7 <script src="../resources/oscillator-testing.js"></script> | 10 <script src="../resources/oscillator-testing.js"></script> |
| 8 </head> | 11 </head> |
| 9 | 12 |
| 10 <body> | 13 <body> |
| 11 <script> | 14 <script> |
| 12 description("Test Triangle Oscillator with Exponential Sweep"); | 15 let audit = Audit.createTaskRunner(); |
| 16 let tester = OscillatorTestingUtils; |
| 13 | 17 |
| 14 // Thresholds for verifying the test passes. The thresholds are experimen
tally determined. | 18 audit.define("test", (task, should) => { |
| 15 | 19 let context = new OfflineAudioContext(1, tester.sampleRate * |
| 16 var tester = OscillatorTestingUtils; | 20 tester.lengthInSeconds, tester.sampleRate); |
| 17 tester.setThresholds({snr: 80.50, maxDiff: 5.71, diffCount: 16982}); | 21 |
| 18 tester.runTest("triangle"); | 22 // Thresholds for verifying the test passes. The thresholds are |
| 19 successfullyParsed = true; | 23 // experimentally determined. |
| 24 tester.setThresholds({ |
| 25 snr: 80.50, |
| 26 maxDiff: 5.71, |
| 27 diffCount: 16982 |
| 28 }); |
| 29 tester.runTest(context, "triangle", |
| 30 "Triangle Oscillator with Exponential Sweep ", task, should); |
| 31 }); |
| 32 |
| 33 audit.run(); |
| 20 </script> | 34 </script> |
| 21 </body> | 35 </body> |
| 22 </html> | 36 </html> |
| OLD | NEW |