| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 | 2 |
| 3 <!-- | 3 <!-- |
| 4 Create two sources and play them simultaneously. This tests unity-gain summing
of AudioNode inputs. | 4 Create two sources and play them simultaneously. This tests unity-gain summing
of AudioNode inputs. |
| 5 The result should be some laughing playing at the same time as the drumming. | 5 The result should be some laughing playing at the same time as the drumming. |
| 6 --> | 6 --> |
| 7 | 7 |
| 8 <html> | 8 <html> |
| 9 <head> | 9 <head> |
| 10 <script type="text/javascript" src="resources/audio-testing.js"></script> | 10 <script type="text/javascript" src="resources/audio-testing.js"></script> |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 var lengthInSeconds = 2; | 21 var lengthInSeconds = 2; |
| 22 | 22 |
| 23 var context = 0; | 23 var context = 0; |
| 24 var bufferLoader = 0; | 24 var bufferLoader = 0; |
| 25 | 25 |
| 26 function init() { | 26 function init() { |
| 27 if (!window.testRunner) | 27 if (!window.testRunner) |
| 28 return; | 28 return; |
| 29 | 29 |
| 30 // Create offline audio context. | 30 // Create offline audio context. |
| 31 context = new webkitOfflineAudioContext(2, sampleRate * lengthInSeconds, sam
pleRate); | 31 context = new OfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRat
e); |
| 32 | 32 |
| 33 bufferLoader = new BufferLoader( | 33 bufferLoader = new BufferLoader( |
| 34 context, | 34 context, |
| 35 [ | 35 [ |
| 36 "resources/hyper-reality/br-jam-loop.wav", | 36 "resources/hyper-reality/br-jam-loop.wav", |
| 37 "resources/hyper-reality/laughter.wav", | 37 "resources/hyper-reality/laughter.wav", |
| 38 ], | 38 ], |
| 39 finishedLoading | 39 finishedLoading |
| 40 ); | 40 ); |
| 41 | 41 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 56 source2.start(0); | 56 source2.start(0); |
| 57 | 57 |
| 58 context.oncomplete = finishAudioTest; | 58 context.oncomplete = finishAudioTest; |
| 59 context.startRendering(); | 59 context.startRendering(); |
| 60 } | 60 } |
| 61 | 61 |
| 62 </script> | 62 </script> |
| 63 | 63 |
| 64 </body> | 64 </body> |
| 65 </html> | 65 </html> |
| OLD | NEW |