Skip to content

Commit

Permalink
Update gh-pages to output generated at 2d58620
Browse files Browse the repository at this point in the history
  • Loading branch information
hoch committed Apr 5, 2024
1 parent 327f113 commit 9c7d354
Show file tree
Hide file tree
Showing 25 changed files with 296 additions and 23 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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</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 @@ -120,7 +120,7 @@ <h2 class="text-3xl pb-6">
</div>
<div class="pb-3">
2010-2024 Chromium authors
(ec18efd)
(2d58620)
</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
(ec18efd)
(2d58620)
</div>
</div>

Expand Down
131 changes: 131 additions & 0 deletions tests/resampler/app.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
'use strict';

const Test = {
initialized: false
};

const logMessage = (message, delayInSecond = 0) => {
console.assert(Test.log);

setTimeout(() => {
Test.log.textContent +=
'[' + performance.now().toFixed(2) + '] ' + message + '\r\n';
}, delayInSecond * 1000);
};

const startAudio = async () => {
console.assert(Test.initialized);

testBody();

Test.startAudioButton.disabled = true;
logMessage('Test started.');
};

const testBody = async () => {
const samplerate = 16000;
const allSempl = 44100;
const tele_checked = {
checked: true,
};


// Creating an audio stream
let audioCtx = new AudioContext({
latencyHint: 'interactive',
sampleRate: samplerate,
});
audioCtx.suspend();

let myArrayBuffer = audioCtx.createBuffer(1 , allSempl * 3, samplerate);
let nowBuffering = myArrayBuffer.getChannelData(0);

// Filling nowBuffering in the view using Web Bluetooth:
// nowBuffering[i] =
// Create a playback object

let source = audioCtx.createBufferSource();
source.loop = true;
source.buffer = myArrayBuffer;

// let mediaStreamDestination = null;
// if(tele_checked.checked) {
// mediaStreamDestination = audioCtx.createMediaStreamDestination();
// }

// *** INCOMPLETE CODE ***
// let ratio_coeff = base_30/filter_save[0].gain_value;
// for(var i=0; i < filter_save.length; i++) {
// filter[i] = audioCtx.createBiquadFilter();
// filter[i].type = "highshelf";
// filter[i].frequency.value = filter_save[i].frequency_value;
// filter[i].gain.value =
// (i==0)?base_30:filter_save[i].gain_value*ratio_coeff;

// if(i>0) {
// document.getElementById('fr-text-'+i).innerHTML =
// filter_save[i].frequency_value;
// document.getElementById('gain-text-'+i).innerHTML =
// filter_save[i].gain_value;
// }
// }

let myAnalyser = audioCtx.createAnalyser();
// myAnalyser.smoothingTimeConstant = smoothingTime;
// myAnalyser.fftSize = fft_Size;

let gainNode = audioCtx.createGain();
// gainNode.gain.value = level_num.value/100. * ratio_level; // 0..1
gainNode.gain.value = 0.25; // 0..1

source.connect(gainNode);

// *** INCOMPLETE CODE ***
// let time_sempl = 0.2;
// Adding a WorkProcessor
// audioCtx.audioWorklet.addModule("worker_processor.js").then(() => {
// worker_processor = new AudioWorkletNode(audioCtx, "worker_processor");
// worker_processor.port.onmessage = (event) => {
// let worker_data = event.data;
// for(let i = 0; i < worker_data.length; i++) {
// time_sempl = time_sempl + 1./samplerate;
// ys.push({simpl_time:time_sempl, simpl_value:wavevolume - Math.floor(worker_data[i]*wavevolume) });
// }
// };
// gainNode.connect(worker_processor); // Data pack for graph and spectrogram

// *** INCOMPLETE CODE ***
// source.connect(filter[0]);
// for(i=0; i<filter_save.length-1; i++) {
// filter[i].connect(filter[i+1]);
// }
// filter[filter_save.length-1].connect(gainNode);

let osc = new OscillatorNode(audioCtx);
osc.connect(gainNode);
gainNode.connect(myAnalyser);
gainNode.connect(audioCtx.destination);

osc.start();
audioCtx.resume();

// *** INCOMPLETE CODE ***
// setTimeout(function(){
// visualize_spectr(myAnalyser);
// }, 300);
};

const initializeTest = async () => {
Test.log = document.getElementById('log');
Test.inspector = document.getElementById('inspector');
Test.startAudioButton = document.getElementById('btn-start-test');

Test.startAudioButton.onclick = startAudio;
Test.startAudioButton.disabled = false;

logMessage('Test initialized. Press "Start Audio" to begin.');
Test.initialized = true;
};

// Entry point
window.addEventListener('load', initializeTest);
Loading

0 comments on commit 9c7d354

Please sign in to comment.