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> |