Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(92)

Unified Diff: third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html

Issue 2793593002: AudioWorklet prototype
Patch Set: Merge changes, AudioParam bug fix Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworkletnode-basic.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html
diff --git a/third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html b/third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html
new file mode 100644
index 0000000000000000000000000000000000000000..7d36a604229512703d1c9eb38e7fa69841a3b27d
--- /dev/null
+++ b/third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworklet-import.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<html>
+<head>
+</head>
+<body>
+ <h1>AudioWorklet Test</h1>
+ <script>
+ let context;
+ let noise;
+ let onepole;
+
+ window.audioWorklet.addModule('processors.js').then(() => {
+ context = new AudioContext();
+
+ let osc = new OscillatorNode(context);
+ let bypass = new AudioWorkletNode(context, 'bypass');
+ noise = new AudioWorkletNode(context, 'noise');
+ onepole = new AudioWorkletNode(context, 'onepole');
+
+ // osc.connect(noise);
+ noise.connect(onepole);
+ onepole.connect(context.destination);
+
+ let noiseGain = noise.parameters.get('gain');
+
+ // osc.frequency.value = 5;
+ // osc.type = 'sine';
+ // osc.connect(noiseGain);
+
+ noiseGain.setValueAtTime(0, 0);
+ noiseGain.linearRampToValueAtTime(1.0, 4);
+ noiseGain.exponentialRampToValueAtTime(0.001, 8);
+
+ osc.start();
+ });
+ </script>
+</body>
+</html>
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/webaudio/audioworklet/audioworkletnode-basic.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698