diff --git a/audio-worklet/basic/audio-worklet-node-options/index.html b/audio-worklet/basic/audio-worklet-node-options/index.html index c21c1e58f..56a028203 100644 --- a/audio-worklet/basic/audio-worklet-node-options/index.html +++ b/audio-worklet/basic/audio-worklet-node-options/index.html @@ -134,7 +134,7 @@

Using Options for AudioWorkletNode

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/bit-crusher/index.html b/audio-worklet/basic/bit-crusher/index.html index 153484545..80f80a1cc 100644 --- a/audio-worklet/basic/bit-crusher/index.html +++ b/audio-worklet/basic/bit-crusher/index.html @@ -118,7 +118,7 @@

BitCrusher with AudioParam

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/handling-errors/index.html b/audio-worklet/basic/handling-errors/index.html index 86f0aadf5..a8a401ca9 100644 --- a/audio-worklet/basic/handling-errors/index.html +++ b/audio-worklet/basic/handling-errors/index.html @@ -118,7 +118,7 @@

Handling Errors

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/hello-audio-worklet/index.html b/audio-worklet/basic/hello-audio-worklet/index.html index 9a0256f30..9a6e05c85 100644 --- a/audio-worklet/basic/hello-audio-worklet/index.html +++ b/audio-worklet/basic/hello-audio-worklet/index.html @@ -117,7 +117,7 @@

Hello Audio Worklet!

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/message-port/index.html b/audio-worklet/basic/message-port/index.html index 7d45a910c..905d17178 100644 --- a/audio-worklet/basic/message-port/index.html +++ b/audio-worklet/basic/message-port/index.html @@ -117,7 +117,7 @@

MessagePort

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/noise-generator/index.html b/audio-worklet/basic/noise-generator/index.html index 67766a517..0a004a650 100644 --- a/audio-worklet/basic/noise-generator/index.html +++ b/audio-worklet/basic/noise-generator/index.html @@ -118,7 +118,7 @@

Noise generator with modulation

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/one-pole-filter/index.html b/audio-worklet/basic/one-pole-filter/index.html index a2b374135..8acb39a83 100644 --- a/audio-worklet/basic/one-pole-filter/index.html +++ b/audio-worklet/basic/one-pole-filter/index.html @@ -118,7 +118,7 @@

One Pole Filter

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/basic/volume-meter/index.html b/audio-worklet/basic/volume-meter/index.html index df365ec5a..edade1c25 100644 --- a/audio-worklet/basic/volume-meter/index.html +++ b/audio-worklet/basic/volume-meter/index.html @@ -120,7 +120,7 @@

Volume Meter

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/design-pattern/shared-buffer/index.html b/audio-worklet/design-pattern/shared-buffer/index.html index cfd51dbb8..5119efaf0 100644 --- a/audio-worklet/design-pattern/shared-buffer/index.html +++ b/audio-worklet/design-pattern/shared-buffer/index.html @@ -122,7 +122,7 @@

AudioWorklet, SharedArrayBuffer, and Worker

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/design-pattern/wasm-ring-buffer/index.html b/audio-worklet/design-pattern/wasm-ring-buffer/index.html index 8842f7ae4..61470ddd9 100644 --- a/audio-worklet/design-pattern/wasm-ring-buffer/index.html +++ b/audio-worklet/design-pattern/wasm-ring-buffer/index.html @@ -119,7 +119,7 @@

Ring Buffer in AudioWorkletProcessor

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/design-pattern/wasm-supersaw/index.html b/audio-worklet/design-pattern/wasm-supersaw/index.html index 7509ac80f..865403212 100644 --- a/audio-worklet/design-pattern/wasm-supersaw/index.html +++ b/audio-worklet/design-pattern/wasm-supersaw/index.html @@ -130,7 +130,7 @@

WebAssembly Supersaw

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/design-pattern/wasm/index.html b/audio-worklet/design-pattern/wasm/index.html index 5fd903b68..169880255 100644 --- a/audio-worklet/design-pattern/wasm/index.html +++ b/audio-worklet/design-pattern/wasm/index.html @@ -119,7 +119,7 @@

Audio Worklet and WebAssembly

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/free-queue/examples/simple-passthrough/index.html b/audio-worklet/free-queue/examples/simple-passthrough/index.html index 26f898311..97b52e245 100644 --- a/audio-worklet/free-queue/examples/simple-passthrough/index.html +++ b/audio-worklet/free-queue/examples/simple-passthrough/index.html @@ -122,7 +122,7 @@

Simple Passthrough Example

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/index.html b/audio-worklet/index.html index 3f3e98b86..5142c9c72 100644 --- a/audio-worklet/index.html +++ b/audio-worklet/index.html @@ -270,7 +270,7 @@

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/migration/spn-recorder/index.html b/audio-worklet/migration/spn-recorder/index.html index c96d36310..dcdb082f1 100644 --- a/audio-worklet/migration/spn-recorder/index.html +++ b/audio-worklet/migration/spn-recorder/index.html @@ -158,7 +158,7 @@

ScriptProcessorNode Audio Recorder

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/audio-worklet/migration/worklet-recorder/index.html b/audio-worklet/migration/worklet-recorder/index.html index 8fea071b1..35c27a879 100644 --- a/audio-worklet/migration/worklet-recorder/index.html +++ b/audio-worklet/migration/worklet-recorder/index.html @@ -158,7 +158,7 @@

AudioWorklet Recorder

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/demos/mld-drum-sampler/index.html b/demos/mld-drum-sampler/index.html index 9f126704b..7e77157ce 100644 --- a/demos/mld-drum-sampler/index.html +++ b/demos/mld-drum-sampler/index.html @@ -116,7 +116,7 @@

Web Audio API 드럼머신 만들기

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/experiments/index.html b/experiments/index.html index 57edf6cdc..3aa9ef4d2 100644 --- a/experiments/index.html +++ b/experiments/index.html @@ -113,7 +113,7 @@

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/experiments/webgpuaudio/index.html b/experiments/webgpuaudio/index.html index 459ac5817..c59a6804d 100644 --- a/experiments/webgpuaudio/index.html +++ b/experiments/webgpuaudio/index.html @@ -115,7 +115,7 @@

WebGPUAudio Experiment

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/index.html b/index.html index 6abca9df8..dff589250 100644 --- a/index.html +++ b/index.html @@ -258,7 +258,7 @@

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/tests/index.html b/tests/index.html index 0fd6e13c2..249d176f5 100644 --- a/tests/index.html +++ b/tests/index.html @@ -121,7 +121,7 @@

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/tests/pannernode/index.html b/tests/pannernode/index.html index 6241c3606..1cf7abde7 100644 --- a/tests/pannernode/index.html +++ b/tests/pannernode/index.html @@ -131,7 +131,7 @@

Glitches in PannerNode

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/tests/playwright/pages/audioworklet-addmodule-resolution.html b/tests/playwright/pages/audioworklet-addmodule-resolution.html deleted file mode 100644 index d199502e6..000000000 --- a/tests/playwright/pages/audioworklet-addmodule-resolution.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - AudioWorklet Add Module Resolution - - -

Audioworklet Add Module Resolution

-

Test if browser doesn't crash upon addModule() call in realtime and offline context construction

-

Port of audioworklet-addmodule-resolution.https.html

- - - - \ No newline at end of file diff --git a/tests/playwright/pages/audioworklet-addmodule-resolution/index.html b/tests/playwright/pages/audioworklet-addmodule-resolution/index.html deleted file mode 100644 index d199502e6..000000000 --- a/tests/playwright/pages/audioworklet-addmodule-resolution/index.html +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - AudioWorklet Add Module Resolution - - -

Audioworklet Add Module Resolution

-

Test if browser doesn't crash upon addModule() call in realtime and offline context construction

-

Port of audioworklet-addmodule-resolution.https.html

- - - - \ No newline at end of file diff --git a/tests/playwright/pages/offline-sine.html b/tests/playwright/pages/offline-sine.html deleted file mode 100644 index cf4105f66..000000000 --- a/tests/playwright/pages/offline-sine.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Offline Sine Test - - -

Offline Sine Test

-

Write 441Hz sine wave for 1 second to AudioBuffer using OfflineAudioContext, sampleRate: 44100

- - - - \ No newline at end of file diff --git a/tests/playwright/pages/offline-sine/index.html b/tests/playwright/pages/offline-sine/index.html deleted file mode 100644 index cf4105f66..000000000 --- a/tests/playwright/pages/offline-sine/index.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - Offline Sine Test - - -

Offline Sine Test

-

Write 441Hz sine wave for 1 second to AudioBuffer using OfflineAudioContext, sampleRate: 44100

- - - - \ No newline at end of file diff --git a/tests/playwright/pages/processors/dummy-processor.js b/tests/playwright/pages/processors/dummy-processor.js deleted file mode 100644 index fadd1da6c..000000000 --- a/tests/playwright/pages/processors/dummy-processor.js +++ /dev/null @@ -1,18 +0,0 @@ -/** - * @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); \ No newline at end of file diff --git a/tests/playwright/pages/realtime-sine.html b/tests/playwright/pages/realtime-sine.html deleted file mode 100644 index 8850d27ae..000000000 --- a/tests/playwright/pages/realtime-sine.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/tests/playwright/pages/realtime-sine/index.html b/tests/playwright/pages/realtime-sine/index.html deleted file mode 100644 index 8850d27ae..000000000 --- a/tests/playwright/pages/realtime-sine/index.html +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - diff --git a/tests/playwright/pages/src/audioBufferToWav.js b/tests/playwright/pages/src/audioBufferToWav.js deleted file mode 100644 index ca45c2b87..000000000 --- a/tests/playwright/pages/src/audioBufferToWav.js +++ /dev/null @@ -1,162 +0,0 @@ -// REF: https://github.com/hoch/canopy/blob/master/docs/js/canopy-exporter.js - -/** - * Writes a string to an array starting at a specified offset. - * - * @param {string} aString - The string to write to the array. - * @param {Uint8Array} targetArray - The array to write to. - * @param {number} offset - The offset in the array to start writing at. - */ -const _writeStringToArray = (aString, targetArray, offset) => { - for (let i = 0; i < aString.length; ++i) { - targetArray[offset + i] = aString.charCodeAt(i); - } -}; - -/** - * Writes a 16-bit integer to an array at the specified offset. - * - * @param {number} aNumber - The 16-bit integer to be written. - * @param {Uint8Array} targetArray - The array to write the integer to. - * @param {number} offset - The offset at which to write the integer in the - * array. - */ -const _writeInt16ToArray = (aNumber, targetArray, offset) => { - aNumber = Math.floor(aNumber); - targetArray[offset] = aNumber & 255; // byte 1 - targetArray[offset + 1] = (aNumber >> 8) & 255; // byte 2 -}; - -/** - * Writes a 32-bit integer to a target array at the specified offset. - * - * @param {number} aNumber - The number to be written. - * @param {Uint8Array} targetArray - The array to write the number to. - * @param {number} offset - The offset at which to start writing. - */ -const _writeInt32ToArray = (aNumber, targetArray, offset) => { - aNumber = Math.floor(aNumber); - targetArray[offset] = aNumber & 255; // byte 1 - targetArray[offset + 1] = (aNumber >> 8) & 255; // byte 2 - targetArray[offset + 2] = (aNumber >> 16) & 255; // byte 3 - targetArray[offset + 3] = (aNumber >> 24) & 255; // byte 4 -}; - -// Return the bits of the float as a 32-bit integer value. This -// produces the raw bits; no intepretation of the value is done. -const _floatBits = (f) => { - const buf = new ArrayBuffer(4); - (new Float32Array(buf))[0] = f; - const bits = (new Uint32Array(buf))[0]; - // Return as a signed integer. - return bits | 0; -}; - -/** - * Converts an audio buffer to an array with the specified bit depth. - * - * @param {AudioBuffer} audioBuffer - The audio buffer to convert. - * @param {Uint8Array} targetArray - The array to store the converted samples. - * @param {number} offset - The offset in the targetArray to start writing the - * converted samples. - * @param {number} bitDepth - The desired bit depth of the converted samples - * (16 or 32). - */ -const _writeAudioBufferToArray = - (audioBuffer, targetArray, offset, bitDepth) => { - let index; let channel = 0; - const length = audioBuffer.length; - const channels = audioBuffer.numberOfChannels; - let channelData; let sample; - - // Clamping samples onto the 16-bit resolution. - for (index = 0; index < length; ++index) { - for (channel = 0; channel < channels; ++channel) { - channelData = audioBuffer.getChannelData(channel); - - // Branches upon the requested bit depth - if (bitDepth === 16) { - sample = channelData[index] * 32768.0; - if (sample < -32768) { - sample = -32768; - } else if (sample > 32767) { - sample = 32767; - } - _writeInt16ToArray(sample, targetArray, offset); - offset += 2; - } else if (bitDepth === 32) { - // This assumes we're going to out 32-float, not 32-bit linear. - sample = _floatBits(channelData[index]); - _writeInt32ToArray(sample, targetArray, offset); - offset += 4; - } else { - console.error('Invalid bit depth for PCM encoding.'); - return; - } - } - } - }; - -/** - * Converts an AudioBuffer object into a WAV file in the form of a binary blob. - * The resulting WAV file can be used for audio playback or further processing. - * The function takes two parameters: audioBuffer which represents the audio - * data, and as32BitFloat which indicates whether the WAV file should be encoded - * as 32-bit float or 16-bit integer PCM. The unction performs various - * calculations and writes the necessary headers and data to create the WAV - * file. Finally, it returns the WAV file as a Blob object with the MIME type - * audio/wave. - * - * @param {AudioBuffer} audioBuffer - * @param {Boolean} as32BitFloat - * @return {Blob} Resulting binary blob. - */ -const audioBufferToWav = (audioBuffer, as32BitFloat) => { - // Encoding setup. - const frameLength = audioBuffer.length; - const numberOfChannels = audioBuffer.numberOfChannels; - const sampleRate = audioBuffer.sampleRate; - const bitsPerSample = as32BitFloat ? 32 : 16; - const bytesPerSample = bitsPerSample / 8; - const byteRate = sampleRate * numberOfChannels * bitsPerSample / 8; - const blockAlign = numberOfChannels * bitsPerSample / 8; - const wavDataByteLength = frameLength * numberOfChannels * bytesPerSample; - const headerByteLength = 44; - const totalLength = headerByteLength + wavDataByteLength; - const waveFileData = new Uint8Array(totalLength); - const subChunk1Size = 16; - const subChunk2Size = wavDataByteLength; - const chunkSize = 4 + (8 + subChunk1Size) + (8 + subChunk2Size); - - _writeStringToArray('RIFF', waveFileData, 0); - _writeInt32ToArray(chunkSize, waveFileData, 4); - _writeStringToArray('WAVE', waveFileData, 8); - _writeStringToArray('fmt ', waveFileData, 12); - - // SubChunk1Size (4) - _writeInt32ToArray(subChunk1Size, waveFileData, 16); - // AudioFormat (2): 3 means 32-bit float, 1 means integer PCM. - _writeInt16ToArray(as32BitFloat ? 3 : 1, waveFileData, 20); - // NumChannels (2) - _writeInt16ToArray(numberOfChannels, waveFileData, 22); - // SampleRate (4) - _writeInt32ToArray(sampleRate, waveFileData, 24); - // ByteRate (4) - _writeInt32ToArray(byteRate, waveFileData, 28); - // BlockAlign (2) - _writeInt16ToArray(blockAlign, waveFileData, 32); - // BitsPerSample (4) - _writeInt32ToArray(bitsPerSample, waveFileData, 34); - _writeStringToArray('data', waveFileData, 36); - // SubChunk2Size (4) - _writeInt32ToArray(subChunk2Size, waveFileData, 40); - - // Write actual audio data starting at offset 44. - _writeAudioBufferToArray(audioBuffer, waveFileData, 44, bitsPerSample); - - return new Blob([waveFileData], { - type: 'audio/wav', - }); -}; - -export default audioBufferToWav; diff --git a/tests/playwright/pages/src/concat.js b/tests/playwright/pages/src/concat.js deleted file mode 100644 index 7be0fcc18..000000000 --- a/tests/playwright/pages/src/concat.js +++ /dev/null @@ -1,16 +0,0 @@ -export default (...arrays) => { - // Calculate the total length of the new Float32Array - const totalLength = arrays.reduce((acc, curr) => acc + curr.length, 0); - - // Create a new Float32Array with the total length - const result = new Float32Array(totalLength); - - // Copy elements from each input array into the new array - let offset = 0; - arrays.forEach((array) => { - result.set(array, offset); - offset += array.length; - }); - - return result; -}; diff --git a/tests/playwright/pages/src/recorder/main.js b/tests/playwright/pages/src/recorder/main.js deleted file mode 100644 index 4c075d5e6..000000000 --- a/tests/playwright/pages/src/recorder/main.js +++ /dev/null @@ -1,38 +0,0 @@ -import concat from '../concat.js'; - -export default async (ctx, scheduleNode) => { - console.assert(ctx instanceof AudioContext); - console.assert(scheduleNode instanceof AudioScheduledSourceNode); - - const mutex = new Promise((resolve) => - scheduleNode.addEventListener('ended', resolve)); - - await ctx.audioWorklet.addModule('./src/recorder/worker.js'); - - const recorder = new AudioWorkletNode(ctx, 'recorder'); - - const arrays = []; - recorder.port.onmessage = (e) => { - !(e.data.channel in arrays) && (arrays[e.data.channel] = []); - arrays[e.data.channel].push(e.data.data); - }; - - // eslint-disable-next-line no-async-promise-executor - const buffer = new Promise(async (resolve) => { - await mutex; - const res = []; - arrays.forEach((array, i) => res[i] = concat(...array)); - - const buf = new AudioBuffer({ - length: res[0].byteLength, - sampleRate: ctx.sampleRate, - numberOfChannels: res.length, - }); - - res.forEach((array, i) => buf.copyToChannel(array, i)); - - resolve(res[0]); - }); - - return {recorder, buffer}; -}; diff --git a/tests/playwright/pages/src/recorder/worker.js b/tests/playwright/pages/src/recorder/worker.js deleted file mode 100644 index 782f7a983..000000000 --- a/tests/playwright/pages/src/recorder/worker.js +++ /dev/null @@ -1,20 +0,0 @@ -// bypass-processor.js -class RecorderProcessor extends AudioWorkletProcessor { - constructor() { - super(); - } - - process(inputs, outputs) { - const input = inputs[0]; - const output = outputs[0]; - - for (let channel = 0; channel < input.length; channel++) { - output[channel].set(input[channel]); - this.port.postMessage({channel, data: input[channel]}); - } - - return true; - } -} - -registerProcessor('recorder', RecorderProcessor); diff --git a/tests/resampler/index.html b/tests/resampler/index.html index 87cb38101..e8b249e9e 100644 --- a/tests/resampler/index.html +++ b/tests/resampler/index.html @@ -123,7 +123,7 @@

Resampler Verificaiton

2010-2024 Chromium authors - (0351b75) + (f28d709)
diff --git a/tests/setsinkid/index.html b/tests/setsinkid/index.html index 28db78308..1ad9e201e 100644 --- a/tests/setsinkid/index.html +++ b/tests/setsinkid/index.html @@ -122,7 +122,7 @@

AudioContext.setSinkId(): Manual Test

2010-2024 Chromium authors - (0351b75) + (f28d709)