Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / mixing.html
blobd3596ebd1be0ba407b0d71a620c80834db272355
1 <!DOCTYPE html>
3 <!--
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.
6 -->
8 <html>
9 <head>
10 <script type="text/javascript" src="resources/audio-testing.js"></script>
11 <script type="text/javascript" src="resources/buffer-loader.js"></script>
13 </head>
14 <body>
16 <script>
18 window.onload = init;
20 var sampleRate = 44100.0;
21 var lengthInSeconds = 2;
23 var context = 0;
24 var bufferLoader = 0;
26 function init() {
27 if (!window.testRunner)
28 return;
30 // Create offline audio context.
31 context = new OfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRate);
33 bufferLoader = new BufferLoader(
34 context,
36 "resources/hyper-reality/br-jam-loop.wav",
37 "resources/hyper-reality/laughter.wav",
39 finishedLoading
42 bufferLoader.load();
43 testRunner.waitUntilDone();
46 function finishedLoading(bufferList) {
47 // Create two sources and play them at the same time.
48 var source1 = context.createBufferSource();
49 var source2 = context.createBufferSource();
50 source1.buffer = bufferList[0];
51 source2.buffer = bufferList[1];
53 source1.connect(context.destination);
54 source2.connect(context.destination);
55 source1.start(0);
56 source2.start(0);
58 context.oncomplete = finishAudioTest;
59 context.startRendering();
62 </script>
64 </body>
65 </html>