Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ actual site built from the source, see `gh-pages` branch.
- `gh-pages`: the actual site built from `main`
- `archive`: old projects/examples (V2 and earlier)

### How to make changes and depoly
### How to make changes and deploy

1. Clone the repository.
2. `npm install`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to_root_dir: ../../../

<h1>{{ eleventyNavigation.title }}</h1>
<p>A simple AudioWorkletNode constructor example that passes options of
waveform type and freqency to the matching AudioWorkletProcessor constructor.
waveform type and frequency to the matching AudioWorkletProcessor constructor.
</p>
<p>See
<a href="https://developer.chrome.com/blog/audio-worklet/" target="_blank">
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/audio-worklet-node-options/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const startAudio = async (context, options) => {
}
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/bit-crusher/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const startAudio = async (context) => {
oscillator.stop(8);
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/handling-errors/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const startAudio = async (context) => {
processErrorWorkletNode.connect(context.destination);
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/hello-audio-worklet/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ const startAudio = async (context) => {
}
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/message-port/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ const startAudio = async (context) => {
const messengerWorkletNode = new MessengerWorkletNode(context);
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/noise-generator/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const startAudio = async (context) => {
}
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/one-pole-filter/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const startAudio = async (context) => {
}
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class OnePoleProcessor extends AudioWorkletProcessor {
const inputChannel = input[channel];
const outputChannel = output[channel];

// If |frequency| parameter doesn't chnage in the current render quantum,
// If |frequency| parameter doesn't change in the current render quantum,
// we don't need to update the filter coef either.
if (isFrequencyConstant) {
this.updateCoefficientsWithFrequency_(frequency[0]);
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/basic/volume-meter/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ const stopAudio = () => {
isGraphReady = false;
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
8 changes: 4 additions & 4 deletions src/audio-worklet/design-pattern/lib/wasm-audio-helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const RENDER_QUANTUM_FRAMES = 128;

/**
* A WASM HEAP wrapper for AudioBuffer class. This breaks down the AudioBuffer
* into an Array of Float32Array for the convinient WASM opearion.
* into an Array of Float32Array for the convinient WASM operation.
*
* @class
* @dependency Module A WASM module generated by the emscripten glue code.
Expand Down Expand Up @@ -167,7 +167,7 @@ class HeapAudioBuffer {
* A JS FIFO implementation for the AudioWorklet. 3 assumptions for the
* simpler operation:
* 1. the push and the pull operation are done by 128 frames. (Web Audio
* API's render quantum size in the speficiation)
* API's render quantum size in the specification)
* 2. the channel count of input/output cannot be changed dynamically.
* The AudioWorkletNode should be configured with the `.channelCount = k`
* (where k is the channel count you want) and
Expand Down Expand Up @@ -211,7 +211,7 @@ class RingBuffer {
*/
push(arraySequence) {
// The channel count of arraySequence and the length of each channel must
// match with this buffer obejct.
// match with this buffer object.

// Transfer data from the |arraySequence| storage to the internal buffer.
const sourceLength = arraySequence[0].length;
Expand All @@ -236,7 +236,7 @@ class RingBuffer {
*/
pull(arraySequence) {
// The channel count of arraySequence and the length of each channel must
// match with this buffer obejct.
// match with this buffer object.

// If the FIFO is completely empty, do nothing.
if (this._framesAvailable === 0) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
// associated AWP via SharedArrayBuffer (SAB).
//
// A pair of SABs is created by this Worker. The one is for the shared states
// (Int32Array) of ring buffer between two obejcts and the other works like the
// (Int32Array) of ring buffer between two objects and the other works like the
// ring buffer for audio content (Float32Array).
//
// The synchronization mechanism between two object is done by wake/wait
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/design-pattern/wasm-ring-buffer/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const startAudio = async (context) => {
oscillator.start();
};

// A simplem onLoad handler. It also handles user gesture to unlock the audio
// A simple onLoad handler. It also handles user gesture to unlock the audio
// playback.
window.addEventListener('load', async () => {
const buttonEl = document.getElementById('button-start');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class RingBufferWorkletProcessor extends AudioWorkletProcessor {
this._inputAudioBuffer.pull(this._inputAudioBuffer.getChannelData());

// This WASM process function can be replaced with ScriptProcessor's
// |onaudioprocess| callback funciton. However, if the event handler
// |onaudioprocess| callback function. However, if the event handler
// touches DOM in the main scope, it needs to be translated with the
// async messaging via MessagePort.
this._kernel.process(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var read_,
// Normally we don't log exceptions but instead let them bubble out the top
// level where the embedding environment (e.g. the browser) can handle
// them.
// However under v8 and node we sometimes exit the process direcly in which case
// However, under v8 and node we sometimes exit the process directly in which case
// its up to use us to log the exception before exiting.
// If we fix https://github.com/emscripten-core/emscripten/issues/15080
// this may no longer be needed under node.
Expand Down Expand Up @@ -543,7 +543,7 @@ function assert(condition, text) {
if (!condition) {
// This build was created without ASSERTIONS defined. `assert()` should not
// ever be called in this configuration but in case there are callers in
// the wild leave this simple abort() implemenation here for now.
// the wild leave this simple abort() implementation here for now.
abort(text);
}
}
Expand Down Expand Up @@ -1228,7 +1228,7 @@ function abort(what) {
// allows this in the wasm spec.

// Suppress closure compiler warning here. Closure compiler's builtin extern
// defintion for WebAssembly.RuntimeError claims it takes no arguments even
// definition for WebAssembly.RuntimeError claims it takes no arguments even
// though it can.
// TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
/** @suppress {checkTypes} */
Expand Down Expand Up @@ -1291,7 +1291,7 @@ function getBinary(file) {
}

function getBinaryPromise() {
// If we don't have the binary yet, try to to load it asynchronously.
// If we don't have the binary yet, try to load it asynchronously.
// Fetch has some additional restrictions over XHR, like it can't be used on a file:// url.
// See https://github.com/github/fetch/pull/92#issuecomment-140665932
// Cordova or Electron apps are typically loaded from a file:// url.
Expand Down Expand Up @@ -1378,7 +1378,7 @@ function createWasm() {
// User shell pages can write their own Module.instantiateWasm = function(imports, successCallback) callback
// to manually instantiate the Wasm module themselves. This allows pages to run the instantiation parallel
// to any other async startup actions they are performing.
// Also pthreads and wasm workers initialize the wasm instance through this path.
// Also, pthreads and wasm workers initialize the wasm instance through this path.
if (Module['instantiateWasm']) {
try {
var exports = Module['instantiateWasm'](info, receiveInstance);
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/design-pattern/wasm-supersaw/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@ an additional step to build and compile. Follow the steps below:

3. In the terminal, run `make` to build the WASM file.

4. Serve `index.html` file in the directoy.
4. Serve `index.html` file in the directory.
2 changes: 1 addition & 1 deletion src/audio-worklet/design-pattern/wasm-supersaw/index.njk
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ to_root_dir: ../../../

<h1>{{ eleventyNavigation.title }}</h1>
<p>A C++ supersaw synth ported via WebAssembly. This example desmonstrates a
bare minumum setup for Audio Worklet to use a WebAssembly module compiled
bare minimum setup for Audio Worklet to use a WebAssembly module compiled
from multiple C++ source codes with dependency.</p>
<p>Press the power button to activate the audio engine. Then press the note
button to play a tone.</p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ function abort(what) {
// allows this in the wasm spec.

// Suppress closure compiler warning here. Closure compiler's builtin extern
// defintion for WebAssembly.RuntimeError claims it takes no arguments even
// definition for WebAssembly.RuntimeError claims it takes no arguments even
// though it can.
// TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
/** @suppress {checkTypes} */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ var read_,
// Normally we don't log exceptions but instead let them bubble out the top
// level where the embedding environment (e.g. the browser) can handle
// them.
// However under v8 and node we sometimes exit the process direcly in which case
// However, under v8 and node we sometimes exit the process directly in which case
// its up to use us to log the exception before exiting.
// If we fix https://github.com/emscripten-core/emscripten/issues/15080
// this may no longer be needed under node.
Expand Down Expand Up @@ -543,7 +543,7 @@ function assert(condition, text) {
if (!condition) {
// This build was created without ASSERTIONS defined. `assert()` should not
// ever be called in this configuration but in case there are callers in
// the wild leave this simple abort() implemenation here for now.
// the wild leave this simple abort() implementation here for now.
abort(text);
}
}
Expand Down Expand Up @@ -1228,7 +1228,7 @@ function abort(what) {
// allows this in the wasm spec.

// Suppress closure compiler warning here. Closure compiler's builtin extern
// defintion for WebAssembly.RuntimeError claims it takes no arguments even
// definition for WebAssembly.RuntimeError claims it takes no arguments even
// though it can.
// TODO(https://github.com/google/closure-compiler/pull/3913): Remove if/when upstream closure gets fixed.
/** @suppress {checkTypes} */
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/free-queue/src/free-queue.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class FreeQueue {
}

/**
* FreeQueue constructor. A shared buffer created by this constuctor
* FreeQueue constructor. A shared buffer created by this constructor
* will be shared between two threads.
*
* @param {number} size Frame buffer length.
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/migration/spn-recorder/exporter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function _writeInt32ToArray(aNumber, targetArray, offset) {
}

// Return the bits of the float as a 32-bit integer value. This
// produces the raw bits; no intepretation of the value is done.
// produces the raw bits; no interpretation of the value is done.
function _floatBits(f) {
const buf = new ArrayBuffer(4);
(new Float32Array(buf))[0] = f;
Expand Down
2 changes: 1 addition & 1 deletion src/audio-worklet/migration/worklet-recorder/exporter.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ function _writeInt32ToArray(aNumber, targetArray, offset) {
}

// Return the bits of the float as a 32-bit integer value. This
// produces the raw bits; no intepretation of the value is done.
// produces the raw bits; no interpretation of the value is done.
function _floatBits(f) {
const buf = new ArrayBuffer(4);
(new Float32Array(buf))[0] = f;
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


/**
* @fileoverview Base for all o3d classes implemented in javscript.
* @fileoverview Base for all o3d classes implemented in javascript.
* Include just this file in a script tag and it will include all other
* source files needed by o3d.
* For more information about o3d see
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/bitmap.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
* Bitmap provides an interface for basic image operations on bitmap,
* including scale and crop. A Bitmap can be created from RawData via
* pack.createBitmapsFromRawData(), and also can be transferred to mip of a
* Texure2D or a specific face of TextureCUBE via methods in Texture.
* Texture2D or a specific face of TextureCUBE via methods in Texture.
* @constructor
*/
o3d.Bitmap = function() {
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/bounding_box.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ o3d.BoundingBox.prototype.intersectRay =
var which_plane;

// Find candidate planes; this loop can be avoided if rays cast all from
// the eye (assumes perpsective view).
// the eye (assumes perspective view).
for (var i = 0; i < kNumberOfDimensions; ++i) {
if (start[i] < min_extent_[i]) {
quadrant[i] = kLeft;
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ o3d.ClientInfo.prototype.buffer_memory_used = 0;
* browser from that same command line if you want to effect just
* that instance of the browser.
*
* Note that many browers require special command line options to
* Note that many browsers require special command line options to
* run in a separate process, otherwise they default to finding
* the browser process already running and using that. For example
* firefox requires the option -no-remote.
Expand Down
6 changes: 3 additions & 3 deletions src/demos/pool/o3d-webgl/pack.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ o3d.inherit('Pack', 'NamedObject');
* after the pack's destruction. Objects will only be destroyed after all
* references to them have been removed.
*
* NOTE: Calling pack.destroy does NOT free your resources. It justs releases
* NOTE: Calling pack.destroy does NOT free your resources. It just releases
* the pack's reference to those resources. An example should hopefully make
* it clearer.
*
Expand Down Expand Up @@ -194,7 +194,7 @@ o3d.Pack.prototype.createObject =
* @param {number} height The height of the texture area in texels (max = 2048)
* @param {o3d.Texture.Format} format The memory format of each texel
* @param {number} levels The number of mipmap levels. Use zero to create the
* compelete mipmap chain.
* complete mipmap chain.
* @param {boolean} enable_render_surfaces If true, the texture object will
* expose RenderSurface objects through GetRenderSurface(...).
* @return {!o3d.Texture2D} The Texture2D object.
Expand Down Expand Up @@ -231,7 +231,7 @@ o3d.Pack.prototype.createTexture2D =
* (max = 2048)
* @param {o3d.Texture.Format} format The memory format of each texel.
* @param {number} levels The number of mipmap levels. Use zero to create
* the compelete mipmap chain.
* the complete mipmap chain.
* @param {boolean} enableRenderSurfaces If true, the texture object
* will expose RenderSurface objects through GetRenderSurface(...).
* @return {!o3d.TextureCUBE} The TextureCUBE object.
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/param.js
Original file line number Diff line number Diff line change
Expand Up @@ -805,7 +805,7 @@ o3d.ParamMatrix4.prototype.applyToLocation = function(gl, location) {
};

/**
* A counter to ensure each texture sampler gets a unqiue id.
* A counter to ensure each texture sampler gets a unique id.
* @private
*/
o3d.Param.texture_index_ = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/demos/pool/o3d-webgl/texture.js
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ o3d.TextureCUBE.prototype.drawImage =


/**
* Makes this texture currrent, and sets various texParameters provided they
* Makes this texture current, and sets various texParameters provided they
* have changed since the last time bindAndSetParameters_ was called for this
* texture.
* @param {number} addressModeU The address mode in the U coordinate.
Expand Down
6 changes: 3 additions & 3 deletions src/demos/pool/o3d-webgl/transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@


/**
* The Transform defines parent child relationship and a localMatrix..
* The Transform defines parent child relationship and a localMatrix.
* A Transform can have one or no parents and
* an arbitrary number of children.
*
Expand Down Expand Up @@ -291,7 +291,7 @@ o3d.Transform.prototype.identity = function() {


/*
* Utility function to copose a matrix with another matrix.
* Utility function to compose a matrix with another matrix.
* Precomposes b with a, changing a, or if the target matrix if
* one is provided.
*
Expand Down Expand Up @@ -564,7 +564,7 @@ o3d.Transform.prototype.translate =

/**
* Pre-composes the local matrix of this Transform with a rotation about the
* x-axis. For example, if the local matrix is a tranlsation, the new local
* x-axis. For example, if the local matrix is a translation, the new local
* matrix will rotate around the x-axis and then translate.
*
* @param {number} radians The number of radians to rotate around x-axis.
Expand Down
Loading