Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / webaudio / audiobuffersource.html
bloba6ce4325c2d0be72a5bbd0c5d14e0dafd0b8fbd4
1 <!DOCTYPE html>
3 <!--
4 See if we can load an AudioBuffer, create an AudioBufferSourceNode, attach the buffer to it, then play it.
5 -->
7 <html>
8 <head>
9 <script type="text/javascript" src="resources/audio-testing.js"></script>
10 <script type="text/javascript" src="resources/buffer-loader.js"></script>
12 <script>
14 window.onload = init;
16 var sampleRate = 44100.0;
17 var lengthInSeconds = 2;
19 var context = 0;
20 var bufferLoader = 0;
22 function init() {
23 if (!window.testRunner)
24 return;
26 // Create offline audio context.
27 context = new OfflineAudioContext(2, sampleRate * lengthInSeconds, sampleRate);
29 bufferLoader = new BufferLoader(
30 context,
32 "resources/hyper-reality/br-jam-loop.wav",
34 finishedLoading
37 bufferLoader.load();
38 testRunner.waitUntilDone();
41 function finishedLoading(bufferList) {
42 var bufferSource = context.createBufferSource();
43 bufferSource.buffer = bufferList[0];
45 bufferSource.connect(context.destination);
46 bufferSource.start(0);
48 context.oncomplete = finishAudioTest;
49 context.startRendering();
52 </script>
53 </head>
54 <body>
55 </body>
56 </html>