OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 | 2 |
3 <!-- | 3 <!-- |
4 Tests that multiple audio-rate signals (AudioNode outputs) can be connected to a
n AudioParam | 4 Tests that multiple audio-rate signals (AudioNode outputs) can be connected to a
n AudioParam |
5 and that these signals are summed, along with the AudioParams intrinsic value. | 5 and that these signals are summed, along with the AudioParams intrinsic value. |
6 --> | 6 --> |
7 | 7 |
8 <html> | 8 <html> |
9 <head> | 9 <head> |
| 10 <script src="resources/compatibility.js"></script> |
10 <script src="resources/audio-testing.js"></script> | 11 <script src="resources/audio-testing.js"></script> |
11 <script src="resources/mix-testing.js"></script> | 12 <script src="resources/mix-testing.js"></script> |
12 <script src="../resources/js-test.js"></script> | 13 <script src="../resources/js-test.js"></script> |
13 | 14 |
14 </head> | 15 </head> |
15 <body> | 16 <body> |
16 | 17 |
17 <script> | 18 <script> |
18 | 19 |
19 var sampleRate = 44100.0; | 20 var sampleRate = 44100.0; |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 if (window.testRunner) { | 75 if (window.testRunner) { |
75 testRunner.dumpAsText(); | 76 testRunner.dumpAsText(); |
76 testRunner.waitUntilDone(); | 77 testRunner.waitUntilDone(); |
77 } | 78 } |
78 | 79 |
79 window.jsTestIsAsync = true; | 80 window.jsTestIsAsync = true; |
80 | 81 |
81 var sampleFrameLength = sampleRate * lengthInSeconds; | 82 var sampleFrameLength = sampleRate * lengthInSeconds; |
82 | 83 |
83 // Create offline audio context. | 84 // Create offline audio context. |
84 context = new webkitOfflineAudioContext(1, sampleFrameLength, sampleRate); | 85 context = new OfflineAudioContext(1, sampleFrameLength, sampleRate); |
85 | 86 |
86 // Create buffer used by the source which will have its gain controlled. | 87 // Create buffer used by the source which will have its gain controlled. |
87 var constantOneBuffer = createConstantBuffer(context, sampleFrameLength, 1); | 88 var constantOneBuffer = createConstantBuffer(context, sampleFrameLength, 1); |
88 var constantSource = context.createBufferSource(); | 89 var constantSource = context.createBufferSource(); |
89 constantSource.buffer = constantOneBuffer; | 90 constantSource.buffer = constantOneBuffer; |
90 | 91 |
91 // Create 1st buffer used to control gain (a linear ramp). | 92 // Create 1st buffer used to control gain (a linear ramp). |
92 linearRampBuffer = createLinearRampBuffer(context, sampleFrameLength); | 93 linearRampBuffer = createLinearRampBuffer(context, sampleFrameLength); |
93 var gainSource1 = context.createBufferSource(); | 94 var gainSource1 = context.createBufferSource(); |
94 gainSource1.buffer = linearRampBuffer; | 95 gainSource1.buffer = linearRampBuffer; |
(...skipping 26 matching lines...) Expand all Loading... |
121 context.startRendering(); | 122 context.startRendering(); |
122 } | 123 } |
123 | 124 |
124 runTest(); | 125 runTest(); |
125 successfullyParsed = true; | 126 successfullyParsed = true; |
126 | 127 |
127 </script> | 128 </script> |
128 | 129 |
129 </body> | 130 </body> |
130 </html> | 131 </html> |
OLD | NEW |