| <!DOCTYPE html> |
| <html> |
| <head> |
| <title> |
| Test Oscillator Node: triangle |
| </title> |
| <script src="../../imported/w3c/web-platform-tests/resources/testharness.js"></script> |
| <script src="../../resources/testharnessreport.js"></script> |
| <script src="../resources/audit-util.js"></script> |
| <script src="../resources/audit.js"></script> |
| <script src="../resources/buffer-loader.js"></script> |
| <script src="../resources/oscillator-testing.js"></script> |
| <script src="../resources/audio-file-utils.js"></script> |
| </head> |
| <body> |
| <script id="layout-test-code"> |
| let audit = Audit.createTaskRunner(); |
| let tester = OscillatorTestingUtils; |
| |
| audit.define('test', (task, should) => { |
| let context = new OfflineAudioContext( |
| 1, tester.sampleRate * tester.lengthInSeconds, tester.sampleRate); |
| |
| // The thresholds are experimentally determined. |
| tester.setThresholds({snr: 129.66, maxDiff: 3.0995e-6}); |
| tester.runTest( |
| context, 'triangle', 'Triangle Oscillator with Exponential Sweep ', |
| task, should); |
| }); |
| |
| audit.run(); |
| </script> |
| </body> |
| </html> |