OLD | NEW |
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> | 1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
| 4 <script src="resources/compatibility.js"></script> |
4 <script src="resources/audio-testing.js"></script> | 5 <script src="resources/audio-testing.js"></script> |
5 <script src="../resources/js-test.js"></script> | 6 <script src="../resources/js-test.js"></script> |
6 <script src="resources/panner-model-testing.js"></script> | 7 <script src="resources/panner-model-testing.js"></script> |
7 </head> | 8 </head> |
8 | 9 |
9 <body> | 10 <body> |
10 <div id="description"></div> | 11 <div id="description"></div> |
11 <div id="console"></div> | 12 <div id="console"></div> |
12 <script> | 13 <script> |
13 description("Test PannerNode handling of feedback loops"); | 14 description("Test PannerNode handling of feedback loops"); |
14 | 15 |
15 // See crbug.com/331446. | 16 // See crbug.com/331446. |
16 | 17 |
17 // Create a simple feedback loop and make sure the panner node processes i
t correctly. | 18 // Create a simple feedback loop and make sure the panner node processes i
t correctly. |
18 | 19 |
19 function runTest() { | 20 function runTest() { |
20 if (window.testRunner) { | 21 if (window.testRunner) { |
21 testRunner.dumpAsText(); | 22 testRunner.dumpAsText(); |
22 testRunner.waitUntilDone(); | 23 testRunner.waitUntilDone(); |
23 } | 24 } |
24 | 25 |
25 window.jsTestIsAsync = true; | 26 window.jsTestIsAsync = true; |
26 | 27 |
27 var sampleRate = 44100; | 28 var sampleRate = 44100; |
28 var renderLengthSeconds = 1; | 29 var renderLengthSeconds = 1; |
29 | 30 |
30 // Create offline audio context. | 31 // Create offline audio context. |
31 var context = new webkitOfflineAudioContext(2, sampleRate * renderLeng
thSeconds, sampleRate); | 32 var context = new OfflineAudioContext(2, sampleRate * renderLengthSeco
nds, sampleRate); |
32 | 33 |
33 // Create nodes in graph. This is based on the test given in crbug.com
/331446. | 34 // Create nodes in graph. This is based on the test given in crbug.com
/331446. |
34 var source = context.createBufferSource(); | 35 var source = context.createBufferSource(); |
35 source.buffer = createImpulseBuffer(context, sampleRate * renderLength
Seconds); | 36 source.buffer = createImpulseBuffer(context, sampleRate * renderLength
Seconds); |
36 var activateNode = context.createGain(); | 37 var activateNode = context.createGain(); |
37 var dry = context.createGain(); | 38 var dry = context.createGain(); |
38 var wet = context.createGain(); | 39 var wet = context.createGain(); |
39 var filter = context.createBiquadFilter(); | 40 var filter = context.createBiquadFilter(); |
40 var delay = context.createDelay(); | 41 var delay = context.createDelay(); |
41 var feedbackNode = context.createGain(); | 42 var feedbackNode = context.createGain(); |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 }; | 75 }; |
75 context.startRendering(); | 76 context.startRendering(); |
76 } | 77 } |
77 | 78 |
78 runTest(); | 79 runTest(); |
79 successfullyParsed = true; | 80 successfullyParsed = true; |
80 </script> | 81 </script> |
81 | 82 |
82 </body> | 83 </body> |
83 </html> | 84 </html> |
OLD | NEW |