OLD | NEW |
| (Empty) |
1 <!doctype html> | |
2 <html> | |
3 <head> | |
4 <title>Test Oscillator Node: sawtooth</title> | |
5 <script src="../resources/js-test.js"></script> | |
6 <script src="resources/compatibility.js"></script> | |
7 <script src="resources/buffer-loader.js"></script> | |
8 <script src="resources/oscillator-testing.js"></script> | |
9 </head> | |
10 | |
11 <body> | |
12 <script> | |
13 description("Test Builtin Oscillator PeriodicWave Tables"); | |
14 | |
15 // Create an offline context with a sample rate that is very different fro
m the sample rate | |
16 // used in the OscillatorTestingUtils. This will create a internal Period
icWave objects for | |
17 // the Oscillator. This should not interfere with the oscillator test usi
ng a different | |
18 // context with a different sample rate. | |
19 | |
20 var context = new OfflineAudioContext(1, 1, 3000); | |
21 var osc = context.createOscillator(); | |
22 osc.type = "sawtooth"; | |
23 osc = null; | |
24 | |
25 // This test is identical to the test in osc-sawtooth-sweep-snr.html. | |
26 var tester = OscillatorTestingUtils; | |
27 | |
28 // The thresholds are experimentally determined. | |
29 tester.setThresholds({snr: 80.00, maxDiff: 4.06, diffCount: 15827}); | |
30 tester.runTest("sawtooth"); | |
31 successfullyParsed = true; | |
32 </script> | |
33 </body> | |
34 </html> | |
OLD | NEW |