diff --git a/docs/api.md b/docs/api.md index b023b42..16f5b53 100644 --- a/docs/api.md +++ b/docs/api.md @@ -53,7 +53,7 @@ manager.resume(); // suspend and resume the `AudioContext` behind the scenes. manager.suspend(); -// Stop and destory all sounds within each `Stack`. +// Stop and destroy all sounds within each `Stack`. // Each `Stack` will remain available in the library // to continue interacting with. manager.stop(); @@ -139,7 +139,7 @@ manager.activeEvents; // Event called whenever the `mute` property changes. (event: 'mute', listener: (muted: boolean) => void) -// Event called whenever an error is occured on the `AudioContext`. +// Event called whenever an error occurs on the `AudioContext`. // This could be a result of: failed to resume, failed to close. (event: 'error', listener: (messages: CombinedErrorMessage) => void) ``` @@ -150,7 +150,7 @@ There are no static members or relevant tokens exposed at the `manager` level. ## Stack API -Capabilities of an indivudual `Earwurm > Stack`. +Capabilities of an individual `Earwurm > Stack`. **Initialization:** @@ -179,7 +179,7 @@ soundStack.has('SoundId'); // to `created`. Accepts an optional `id`. Otherwise, `id` is auto // assigned by combining the `id` passed to `new Stack()` with // the total number of sounds created during this stack’s life. -// Will return a `Promise` which resolves to the`Sound` instance. +// Will return a `Promise` which resolves to the `Sound` instance. // You can either chain with `.then()`, or `await` and call // `.play()` once the `Promise` has resolved. soundStack.prepare(optionalId); @@ -265,7 +265,7 @@ soundStack.activeEvents; // Event called whenever the `mute` property changes. (event: 'mute', listener: (muted: boolean) => void) -// Event called whenever an error is occured on the `Stack`. +// Event called whenever an error occurs on the `Stack`. // This could be a result of: failed to load the `path`. (event: 'error', listener: ({id, message}: StackError) => void) ``` diff --git a/docs/contributing.md b/docs/contributing.md index bd35db3..8920a88 100644 --- a/docs/contributing.md +++ b/docs/contributing.md @@ -47,7 +47,6 @@ For a list of all the available commands, please see the root `package.json`. Ov - All `localhost` addresses for running apps will be printed to your terminal when you run `start`. - `lint` checks the codebase for `eslint` errors, but does not fix them. - `lint:fix` automatically fixes any `eslint` errors that can be programatically resolved. -- `format` originally checked the codebase for `prettier` errors, but that is now handled by `eslint` and is performed via the `lint` tasks. - `type-check` checks the codebase for any TypeScript errors, but does not fix them. - `test` fires up the `vitest` server and runs all `*.test.ts` files. - `clean` will delete any `dist` and `coverage` folders. @@ -86,7 +85,7 @@ If you want to preview the production build of the `website`, you can run the fo ```sh pnpm build -pnpm --filter website preview +pnpm preview ``` The `website` should now be available on a locally reachable address, allowing you to test on a `mobile` device. diff --git a/docs/conversion.md b/docs/conversion.md index 8e1cac3..effd3d6 100644 --- a/docs/conversion.md +++ b/docs/conversion.md @@ -1,8 +1,8 @@ # Converting audio -This documentation will NOT describe how to record audio and export it from any editing software. +> This documentation will NOT describe how to record audio and export it from any editing software. For that, you may want to read: -Quite simply, if you have existing audio files that are not already in `webm` format, you can convert them using a command-line tool called [`ffmpeg`](https://ffmpeg.org/). You can learn some audio-specific commands from the [`ffmpeg` documentation](https://ffmpeg.org/ffmpeg.html#Audio-Options). +If you have existing audio files that are not already in `webm` format, you can convert them using a command-line tool called [`ffmpeg`](https://ffmpeg.org/). You can learn some audio-specific commands from the [`ffmpeg` documentation](https://ffmpeg.org/ffmpeg.html#Audio-Options). Using `ffmpeg`, you can select an audio file as an “input source”, pass some options that tell `ffmpeg` how you want to transform the audio, and point to an “output source” to save the converted asset. diff --git a/docs/design.md b/docs/design.md index 095a911..d72013f 100644 --- a/docs/design.md +++ b/docs/design.md @@ -17,8 +17,8 @@ The quickest way to describe the “structure” of an `Earwurm` is: - The `Manager` contains a library of “stacks”. - A `Stack` contains a queue of “sounds”. - A `Sound` is created and queued within the `Stack`. - - The queue builds up upon `stack.prepare()`. - - The queue decreases upon `sound.stop()` _(or `ended` event)_. + - The queue increases when calling: `stack.prepare()`. + - The queue decreases when calling: `sound.stop()` _(or `ended` event)_. - The queue has a maximum size. - A `Sound` is automatically destroyed as new sounds are added that would exceed that maximum size. - As sounds begin playing, their output travels through a “chain of gain nodes”, the final “destination” being your device’s speakers. diff --git a/pkg/earwurm/src/Sound.ts b/pkg/earwurm/src/Sound.ts index 35efeaf..9f7c0b2 100644 --- a/pkg/earwurm/src/Sound.ts +++ b/pkg/earwurm/src/Sound.ts @@ -306,7 +306,7 @@ export class Sound extends EmittenCommon { // was "stopped" or came to a natural "end". // We should also include the `iterations` value here so // that we can distinguish from a `loop > stop` having - // played to completion at least one. Lastly, we might + // played to completion at least once. Lastly, we might // also need to indicate if this was a "scratch buffer". this.emit('ended', { id: this.id, diff --git a/pkg/earwurm/vite.config.ts b/pkg/earwurm/vite.config.ts index d30b169..34a4968 100644 --- a/pkg/earwurm/vite.config.ts +++ b/pkg/earwurm/vite.config.ts @@ -4,8 +4,8 @@ import dts from 'vite-plugin-dts'; import pkg from './package.json'; -// TODO: We may need a unique `vitest.config.ts` file for this -// package... but simply adding that file does not appear to work. +// TODO: We may need a unique `vitest.config.ts` file. +// https://vitest.dev/guide/#workspaces-support export default defineConfig({ build: { lib: {