browser/devtools/webaudioeditor/test/doc_complex-context.html

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:1bdc8b08b666
1 <!-- Any copyright is dedicated to the Public Domain.
2 http://creativecommons.org/publicdomain/zero/1.0/ -->
3 <!doctype html>
4
5 <html>
6 <head>
7 <meta charset="utf-8"/>
8 <title>Web Audio Editor test page</title>
9 </head>
10
11 <body>
12
13 <script type="text/javascript;version=1.8">
14 "use strict";
15
16 /*
17 ↱ proc
18 osc → gain →
19 osc → gain → destination
20 buffer →↳ filter →
21 */
22 let ctx = new AudioContext();
23 let osc1 = ctx.createOscillator();
24 let gain1 = ctx.createGain();
25 let proc = ctx.createScriptProcessor();
26 osc1.connect(gain1);
27 osc1.connect(proc);
28 gain1.connect(ctx.destination);
29
30 let osc2 = ctx.createOscillator();
31 let gain2 = ctx.createGain();
32 osc2.connect(gain2);
33 gain2.connect(ctx.destination);
34
35 let buf = ctx.createBufferSource();
36 let filter = ctx.createBiquadFilter();
37 buf.connect(filter);
38 osc2.connect(filter);
39 filter.connect(ctx.destination);
40
41 </script>
42 </body>
43
44 </html>

mercurial