3.0 KiB
Add @suaveplan/audio-ir-room-plugin-club
Package: @suaveplan/audio-ir-room-plugin-club
Status: PROPOSED
Type: new-package
Why
Genesis-original IR content package. Ships the club1.wav and club2.wav room impulse responses (from /mnt/c/Users/Administrator/Mountain Duck/74a17879-9780-426d-8bd9-7ed805f53d41/media/_/audio/ir/room/) as bundle-local assets resolved through the shipped @suaveplan/storage-uri-plugin-bundle. Serves as the canonical example of the bundle-only content-package pattern — every future audio-ir-{family}-plugin-<name> package that ships only local files follows this shape.
What changes
- ADDED:
manifest: IrManifest—{ packageSlug: "club", family: "room", entries: [<club-club1>, <club-club2>] }. - ADDED:
register(registry: IrRegistry, resolver: StorageUriResolver): void— registers the package-scopedbundleUriPluginon the resolver AND callsregisterManifest(registry, manifest). - ADDED:
files/club1.wavANDfiles/club2.wav— bundled binary assets, package-included in tarball. - ADDED:
entriesidsclub-club1andclub-club2, each withuri: "bundle://audio-ir-room-plugin-club/club1.wav"(andclub2.wav).
Out of scope
- Decoding —
audio-ir-loaderowns it. This package only registers manifest entries. - Any non-room IRs — separate packages per family per source.
- Multi-source fallback — these IRs are bundle-only by design; the
poolpackage demonstrates the fallback pattern.
Source mapping
Files copied from /mnt/c/Users/Administrator/Mountain Duck/74a17879-9780-426d-8bd9-7ed805f53d41/media/_/audio/ir/room/club{1,2}.wav (Mountain Duck media library). Cross-cutting model: openspec/changes/add-audio-ir-core/design.md.
Requirements with no source line
| Requirement | Justification |
|---|---|
| every spec requirement | Genesis-original content package |
Verification approach
src/manifest/manifest.test.ts— manifest parses successfully throughIrManifestSchema; every entry'sidmatches the slug-prefix rule; bothurivalues parse as well-formedbundle://URIs.src/register/register.test.ts—register(registry, resolver)(a) adds abundleUriPluginforaudio-ir-room-plugin-clubto the resolver and (b) registers both manifest entries; double-call throwsAUDIO_IR.DUPLICATE_ID(the registry's invariant).tests/integration/end-to-end.test.ts— wirebundleUriPlugininto a realStorageUriResolver, register viaregister(...), pass tocreateIrLoader({ ..., decoders: { wav: decodeWav } }), callloader.load("club-club1"), assert non-empty Float32Array channels with the manifest-declared shape. Run identically forclub-club2.tests/integration/file-presence.test.ts— assertfiles/club1.wavandfiles/club2.wavexist on disk at build time and are non-empty.
Impact
Affected dependents
No dependents (brand new). Verified by bunx turbo ls --filter=...@suaveplan/audio-ir-room-plugin-club returning only the package itself.