OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <html> | 3 <html> |
4 <head> | 4 <head> |
| 5 <script src="resources/compatibility.js"></script> |
5 <script src="resources/audio-testing.js"></script> | 6 <script src="resources/audio-testing.js"></script> |
6 <script src="../resources/js-test.js"></script> | 7 <script src="../resources/js-test.js"></script> |
7 <script src="resources/biquad-testing.js"></script> | 8 <script src="resources/biquad-testing.js"></script> |
8 </head> | 9 </head> |
9 | 10 |
10 <body> | 11 <body> |
11 | 12 |
12 <div id="description"></div> | 13 <div id="description"></div> |
13 <div id="console"></div> | 14 <div id="console"></div> |
14 | 15 |
15 <script> | 16 <script> |
16 description("Tests Biquad peaking filter."); | 17 description("Tests Biquad peaking filter."); |
17 | 18 |
18 function runTest() { | 19 function runTest() { |
19 if (window.testRunner) { | 20 if (window.testRunner) { |
20 testRunner.dumpAsText(); | 21 testRunner.dumpAsText(); |
21 testRunner.waitUntilDone(); | 22 testRunner.waitUntilDone(); |
22 } | 23 } |
23 | 24 |
24 window.jsTestIsAsync = true; | 25 window.jsTestIsAsync = true; |
25 | 26 |
26 // Create offline audio context. | 27 // Create offline audio context. |
27 var context = new webkitOfflineAudioContext(2, sampleRate * renderLengthSeco
nds, sampleRate); | 28 var context = new OfflineAudioContext(2, sampleRate * renderLengthSeconds, s
ampleRate); |
28 | 29 |
29 // The filters we want to test. | 30 // The filters we want to test. |
30 var filterParameters = [{cutoff : 0, q : 10, gain : 10 }, | 31 var filterParameters = [{cutoff : 0, q : 10, gain : 10 }, |
31 {cutoff : 1, q : 10, gain : 10 }, | 32 {cutoff : 1, q : 10, gain : 10 }, |
32 {cutoff : .5, q : 0, gain : 10 }, | 33 {cutoff : .5, q : 0, gain : 10 }, |
33 {cutoff : 0.25, q : 10, gain : 10 }, | 34 {cutoff : 0.25, q : 10, gain : 10 }, |
34 ]; | 35 ]; |
35 | 36 |
36 createTestAndRun(context, "peaking", filterParameters); | 37 createTestAndRun(context, "peaking", filterParameters); |
37 } | 38 } |
38 | 39 |
39 runTest(); | 40 runTest(); |
40 successfullyParsed = true; | 41 successfullyParsed = true; |
41 | 42 |
42 </script> | 43 </script> |
43 | 44 |
44 </body> | 45 </body> |
45 </html> | 46 </html> |
OLD | NEW |