OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
5 <script src="../../resources/testharness.js"></script> | 5 <script src="../../resources/testharness.js"></script> |
6 <script src="../../resources/testharnessreport.js"></script> | 6 <script src="../../resources/testharnessreport.js"></script> |
7 <script src="../resources/audit-util.js"></script> | 7 <script src="../resources/audit-util.js"></script> |
8 <script src="../resources/audit.js"></script> | 8 <script src="../resources/audit.js"></script> |
9 <script src="../resources/biquad-filters.js"></script> | 9 <script src="../resources/biquad-filters.js"></script> |
10 <script src="../resources/biquad-testing.js"></script> | 10 <script src="../resources/biquad-testing.js"></script> |
11 </head> | 11 </head> |
12 | 12 |
13 <body> | 13 <body> |
14 <script> | 14 <script> |
15 let audit = Audit.createTaskRunner(); | 15 let audit = Audit.createTaskRunner(); |
16 | 16 |
17 audit.define("test", function (task, should) { | 17 audit.define({ |
18 task.describe("Biquad allpass filter"); | 18 label: "test", |
| 19 description: "Biquad allpass filter" |
| 20 }, function (task, should) { |
19 | 21 |
20 // Create offline audio context. | 22 // Create offline audio context. |
21 let context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, s
ampleRate); | 23 let context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, s
ampleRate); |
22 | 24 |
23 let filterParameters = [{cutoff : 0, q : 10, gain : 1 }, | 25 let filterParameters = [{cutoff : 0, q : 10, gain : 1 }, |
24 {cutoff : 1, q : 10, gain : 1 }, | 26 {cutoff : 1, q : 10, gain : 1 }, |
25 {cutoff : .5, q : 0, gain : 1 }, | 27 {cutoff : .5, q : 0, gain : 1 }, |
26 {cutoff : 0.25, q : 10, gain : 1 }, | 28 {cutoff : 0.25, q : 10, gain : 1 }, |
27 ]; | 29 ]; |
28 createTestAndRun(context, "allpass", { | 30 createTestAndRun(context, "allpass", { |
29 should: should, | 31 should: should, |
30 threshold: 3.9337e-8, | 32 threshold: 3.9337e-8, |
31 filterParameters: filterParameters | 33 filterParameters: filterParameters |
32 }).then(task.done.bind(task)); | 34 }).then(task.done.bind(task)); |
33 }); | 35 }); |
34 | 36 |
35 audit.run(); | 37 audit.run(); |
36 </script> | 38 </script> |
37 | 39 |
38 </body> | 40 </body> |
39 </html> | 41 </html> |
OLD | NEW |