Skip to content

Commit

Permalink
Update gh-pages to output generated at b817c71
Browse files Browse the repository at this point in the history
  • Loading branch information
terryzfeng committed Jun 11, 2024
1 parent 1771c3e commit 996b2be
Show file tree
Hide file tree
Showing 31 changed files with 268 additions and 24 deletions.
2 changes: 1 addition & 1 deletion audio-worklet/basic/audio-worklet-node-options/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ <h1>Using Options for AudioWorkletNode</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/bit-crusher/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>BitCrusher with AudioParam</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/handling-errors/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>Handling Errors</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/hello-audio-worklet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1>Hello Audio Worklet!</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/message-port/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ <h1>MessagePort</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/noise-generator/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>Noise generator with modulation</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/one-pole-filter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ <h1>One Pole Filter</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/basic/volume-meter/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ <h1>Volume Meter</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/design-pattern/shared-buffer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h1>AudioWorklet, SharedArrayBuffer, and Worker</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/design-pattern/wasm-ring-buffer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h1>Ring Buffer in AudioWorkletProcessor</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/design-pattern/wasm-supersaw/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ <h1>WebAssembly Supersaw</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/design-pattern/wasm/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ <h1>Audio Worklet and WebAssembly</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ <h1>Simple Passthrough Example</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ <h2 class="text-3xl pb-6">
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/migration/spn-recorder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h1>ScriptProcessorNode Audio Recorder</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion audio-worklet/migration/worklet-recorder/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ <h1>AudioWorklet Recorder</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion demos/mld-drum-sampler/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ <h1>Web Audio API 드럼머신 만들기</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion experiments/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2 class="text-3xl pb-6">
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion experiments/webgpuaudio/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ <h1>WebGPUAudio Experiment</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ <h2 class="text-3xl pb-6">
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion tests/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ <h2 class="text-3xl pb-6">
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
2 changes: 1 addition & 1 deletion tests/pannernode/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ <h1>Glitches in PannerNode</h1>
</div>
<div class="pb-3">
2010-2024 Chromium authors
(60e8630)
(b817c71)
</div>
</div>

Expand Down
46 changes: 46 additions & 0 deletions tests/playwright/pages/audioworklet-addmodule-resolution.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AudioWorklet Add Module Resolution</title>
</head>
<body>
<h1>Audioworklet Add Module Resolution</h1>
<p>Test if browser doesn't crash upon addModule() call in realtime and offline context construction</p>
<p>Port of <a href="https://wpt.fyi/results/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-addmodule-resolution.https.html?label=experimental&label=master&aligned">audioworklet-addmodule-resolution.https.html</a></p>

<script>
const sampleRate = 48000;
const realtimeContext = new AudioContext();
const offlineContext = new OfflineAudioContext(1, sampleRate, sampleRate);

const filePath = 'processors/dummy-processor.js';

const addModulesPromise = Promise.all([
realtimeContext.audioWorklet.addModule(filePath),
offlineContext.audioWorklet.addModule(filePath)
]).then(() => {
return new Promise((resolve, reject) => {
try {
// Test if the browser does not crash upon addModule() call after the
// realtime context construction.
let realtimeDummyWorklet = new AudioWorkletNode(realtimeContext, 'dummy');
realtimeDummyWorklet.connect(realtimeContext.destination);
window.realtimeDummyWorkletLoaded = realtimeDummyWorklet instanceof AudioWorkletNode;

// Test if the browser does not crash upon addModule() call after the
// offline context construction.
let offlineDummyWorklet = new AudioWorkletNode(offlineContext, 'dummy');
offlineDummyWorklet.connect(offlineContext.destination);
window.offlineDummyWorkletLoaded = offlineDummyWorklet instanceof AudioWorkletNode;

resolve();
} catch(error) {
reject(error);
}
});
});
</script>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AudioWorklet Add Module Resolution</title>
</head>
<body>
<h1>Audioworklet Add Module Resolution</h1>
<p>Test if browser doesn't crash upon addModule() call in realtime and offline context construction</p>
<p>Port of <a href="https://wpt.fyi/results/webaudio/the-audio-api/the-audioworklet-interface/audioworklet-addmodule-resolution.https.html?label=experimental&label=master&aligned">audioworklet-addmodule-resolution.https.html</a></p>

<script>
const sampleRate = 48000;
const realtimeContext = new AudioContext();
const offlineContext = new OfflineAudioContext(1, sampleRate, sampleRate);

const filePath = 'processors/dummy-processor.js';

const addModulesPromise = Promise.all([
realtimeContext.audioWorklet.addModule(filePath),
offlineContext.audioWorklet.addModule(filePath)
]).then(() => {
return new Promise((resolve, reject) => {
try {
// Test if the browser does not crash upon addModule() call after the
// realtime context construction.
let realtimeDummyWorklet = new AudioWorkletNode(realtimeContext, 'dummy');
realtimeDummyWorklet.connect(realtimeContext.destination);
window.realtimeDummyWorkletLoaded = realtimeDummyWorklet instanceof AudioWorkletNode;

// Test if the browser does not crash upon addModule() call after the
// offline context construction.
let offlineDummyWorklet = new AudioWorkletNode(offlineContext, 'dummy');
offlineDummyWorklet.connect(offlineContext.destination);
window.offlineDummyWorkletLoaded = offlineDummyWorklet instanceof AudioWorkletNode;

resolve();
} catch(error) {
reject(error);
}
});
});
</script>
</body>
</html>
32 changes: 32 additions & 0 deletions tests/playwright/pages/offline-sine.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Offline Sine Test</title>
</head>
<body>
<h1>Offline Sine Test</h1>
<p>Write 441Hz sine wave for 1 second to AudioBuffer using OfflineAudioContext, sampleRate: 44100</p>

<script>
const sampleRate = 44100;
const length = 1;
const numChannels = 1;
const freq = 441;

const offlineContext = new OfflineAudioContext(numChannels, length * sampleRate, sampleRate);
const osc = offlineContext.createOscillator();
osc.type = 'sine';
osc.frequency.value = freq;
osc.connect(offlineContext.destination);

const bufferData = new Promise((resolve, reject) => {
osc.start();
offlineContext.startRendering().then((buffer) => {
resolve(buffer.getChannelData(0));
});
});
</script>
</body>
</html>
32 changes: 32 additions & 0 deletions tests/playwright/pages/offline-sine/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Offline Sine Test</title>
</head>
<body>
<h1>Offline Sine Test</h1>
<p>Write 441Hz sine wave for 1 second to AudioBuffer using OfflineAudioContext, sampleRate: 44100</p>

<script>
const sampleRate = 44100;
const length = 1;
const numChannels = 1;
const freq = 441;

const offlineContext = new OfflineAudioContext(numChannels, length * sampleRate, sampleRate);
const osc = offlineContext.createOscillator();
osc.type = 'sine';
osc.frequency.value = freq;
osc.connect(offlineContext.destination);

const bufferData = new Promise((resolve, reject) => {
osc.start();
offlineContext.startRendering().then((buffer) => {
resolve(buffer.getChannelData(0));
});
});
</script>
</body>
</html>
18 changes: 18 additions & 0 deletions tests/playwright/pages/processors/dummy-processor.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
/**
* @class DummyProcessor
* @extends AudioWorkletProcessor
*
* This processor class demonstrates the bare-bone structure of the processor.
*/
class DummyProcessor extends AudioWorkletProcessor {
constructor() {
super();
}

process(inputs, outputs, parameters) {
// Doesn't do anything here.
return true;
}
}

registerProcessor('dummy', DummyProcessor);
Loading

0 comments on commit 996b2be

Please sign in to comment.