first commit
This commit is contained in:
74
docs/media/audio-ir/audio-ir-room-plugin-pool/README.md
Normal file
74
docs/media/audio-ir/audio-ir-room-plugin-pool/README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# @suaveplan/audio-ir-room-plugin-pool - Original audio-ir content package: ships the outdoor-swimming-pool room impulse response paired with a https CDN fallback. Universal.
|
||||
|
||||
Original audio-ir content package. Ships a single `room`-family
|
||||
impulse response — `pool-outdoor-swimming-pool` — sourced from the
|
||||
outdoor-swimming-pool capture in the Suaveplan internal media library,
|
||||
paired with a CDN fallback at `https://swch.b-cdn.net/_/audio/ir/room/roompool.wav`.
|
||||
|
||||
Universal; no browser, DOM, or Node-specific APIs in the public
|
||||
surface. The shipped bundle plugin uses `import.meta.url` to locate the
|
||||
in-tarball `files/` directory at runtime.
|
||||
|
||||
<!-- begin:auto-docs -->
|
||||
## Documentation tree
|
||||
|
||||
- [manifest](./src/manifest/manifest.md) — Declares the lone `IrManifestEntry` shipped by `@suaveplan/audio-ir-room-plugin-pool`. The entry's `uri` is a `fallback…
|
||||
- [manifest](./src/manifest/manifest.md) — Declares the lone `IrManifestEntry` shipped by `@suaveplan/audio-ir-room-plugin-pool`. The entry's `uri` is a `fallback…
|
||||
- [register](./src/register/register.md) — Single entry point for plugging `@suaveplan/audio-ir-room-plugin-pool` into a consumer's `IrRegistry` + `StorageUriReso…
|
||||
- [register](./src/register/register.md) — Single entry point for plugging `@suaveplan/audio-ir-room-plugin-pool` into a consumer's `IrRegistry` + `StorageUriReso…
|
||||
<!-- end:auto-docs -->
|
||||
|
||||
## Modules
|
||||
|
||||
- `./manifest` — `manifest: IrManifest`, plus the canonical constants
|
||||
(`BUNDLE_PACKAGE_SLUG`, `BUNDLE_URI`, `CDN_URI`, `ENTRY_ID`,
|
||||
`CHANNELS`, `SAMPLE_RATE`).
|
||||
- `./register` — `register(registry, target, options?)` and the
|
||||
re-exported `MutableUriPluginRegistrar` type (sourced from
|
||||
`@suaveplan/audio-ir-core`). Wires the bundle plugin onto a
|
||||
consumer-supplied registrar and calls `registerManifest`.
|
||||
|
||||
## Quick start
|
||||
|
||||
```ts
|
||||
import {
|
||||
createIrRegistry,
|
||||
createUriPluginCollector,
|
||||
} from "@suaveplan/audio-ir-core";
|
||||
import { createIrLoader } from "@suaveplan/audio-ir-loader";
|
||||
import { decodeWav } from "@suaveplan/audio-decode-wav";
|
||||
import { createStorageUriResolver } from "@suaveplan/storage-uri";
|
||||
import { fallbackUriPlugin } from "@suaveplan/storage-uri-plugin-fallback";
|
||||
import { register } from "@suaveplan/audio-ir-room-plugin-pool";
|
||||
|
||||
const registry = createIrRegistry();
|
||||
const collector = createUriPluginCollector();
|
||||
register(registry, collector);
|
||||
|
||||
// Append the consumer's https://-aware plugin via collector.use(...).
|
||||
const innerPlugins = [...collector.plugins];
|
||||
const innerResolver = createStorageUriResolver(innerPlugins);
|
||||
const fb = fallbackUriPlugin({
|
||||
resolver: innerResolver,
|
||||
policy: { errorClass: "any" },
|
||||
});
|
||||
const resolver = createStorageUriResolver([...innerPlugins, fb]);
|
||||
|
||||
const loader = createIrLoader({
|
||||
registry,
|
||||
resolver,
|
||||
decoders: { wav: decodeWav },
|
||||
});
|
||||
const ir = await loader.load("pool-outdoor-swimming-pool");
|
||||
```
|
||||
|
||||
## License & sources
|
||||
|
||||
The bundled WAV (`files/outdoor-swimming-pool.wav`) was copied from the
|
||||
Suaveplan internal media library at
|
||||
`/mnt/c/Users/Administrator/Mountain Duck/74a17879-9780-426d-8bd9-7ed805f53d41/media/_/audio/ir/room/outdoor-swimming-pool.wav`.
|
||||
The CDN copy lives at `https://swch.b-cdn.net/_/audio/ir/room/roompool.wav`.
|
||||
|
||||
License: **All Rights Reserved — Suaveplan internal media library**. Do
|
||||
not redistribute the bundled WAV outside Suaveplan distributions.
|
||||
|
||||
Reference in New Issue
Block a user