| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <html> | 3 <html> |
| 4 <head> | 4 <head> |
| 5 <script src="../resources/js-test.js"></script> | 5 <script src="../resources/js-test.js"></script> |
| 6 <script src="resources/compatibility.js"></script> |
| 6 <script type="text/javascript" src="resources/audio-testing.js"></script> | 7 <script type="text/javascript" src="resources/audio-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 | 13 |
| 13 <script> | 14 <script> |
| 14 description("Channel mixing rules for AudioNodes."); | 15 description("Channel mixing rules for AudioNodes."); |
| 15 | 16 |
| (...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 275 if (window.testRunner) { | 276 if (window.testRunner) { |
| 276 testRunner.dumpAsText(); | 277 testRunner.dumpAsText(); |
| 277 testRunner.waitUntilDone(); | 278 testRunner.waitUntilDone(); |
| 278 } | 279 } |
| 279 | 280 |
| 280 window.jsTestIsAsync = true; | 281 window.jsTestIsAsync = true; |
| 281 | 282 |
| 282 // Create 8-channel offline audio context. | 283 // Create 8-channel offline audio context. |
| 283 // Each test will render 8 sample-frames starting at sample-frame position t
estNumber * 8. | 284 // Each test will render 8 sample-frames starting at sample-frame position t
estNumber * 8. |
| 284 var totalFrameLength = numberOfTests * singleTestFrameLength; | 285 var totalFrameLength = numberOfTests * singleTestFrameLength; |
| 285 context = new webkitOfflineAudioContext(renderNumberOfChannels, totalFrameLe
ngth, sampleRate); | 286 context = new OfflineAudioContext(renderNumberOfChannels, totalFrameLength,
sampleRate); |
| 286 | 287 |
| 287 // Set destination to discrete mixing. | 288 // Set destination to discrete mixing. |
| 288 context.destination.channelCount = renderNumberOfChannels; | 289 context.destination.channelCount = renderNumberOfChannels; |
| 289 context.destination.channelCountMode = "explicit"; | 290 context.destination.channelCountMode = "explicit"; |
| 290 context.destination.channelInterpretation = "discrete"; | 291 context.destination.channelInterpretation = "discrete"; |
| 291 | 292 |
| 292 // Create test buffers from 1 to 8 channels. | 293 // Create test buffers from 1 to 8 channels. |
| 293 testBuffers = new Array(); | 294 testBuffers = new Array(); |
| 294 for (var i = 0; i < renderNumberOfChannels; ++i) { | 295 for (var i = 0; i < renderNumberOfChannels; ++i) { |
| 295 testBuffers[i] = createTestBuffer(i + 1); | 296 testBuffers[i] = createTestBuffer(i + 1); |
| (...skipping 12 matching lines...) Expand all Loading... |
| 308 context.oncomplete = checkResult; | 309 context.oncomplete = checkResult; |
| 309 context.startRendering(); | 310 context.startRendering(); |
| 310 } | 311 } |
| 311 | 312 |
| 312 runTest(); | 313 runTest(); |
| 313 | 314 |
| 314 </script> | 315 </script> |
| 315 | 316 |
| 316 </body> | 317 </body> |
| 317 </html> | 318 </html> |
| OLD | NEW |