Add JamesDSP playback controls and verification harness

This commit is contained in:
Jonathan Sykes
2026-10-09 20:29:37 +08:00
parent 27b32ff0c9
commit 6bb3271431
15 changed files with 376 additions and 29 deletions

View File

@@ -18,7 +18,7 @@ test('JamesDSP runtime files live only in a lazy background group', () => {
'/vendor/jamesdsp/jamesdsp-node.mjs',
'/vendor/jamesdsp/params.mjs',
'/vendor/jamesdsp/worklet.mjs',
'/vendor/jamesdsp/dsp/jamesdsp.mjs',
'/vendor/jamesdsp/dsp/jamesdsp-77be0b2.mjs',
'/vendor/jamesdsp/dsp/jamesdsp.wasm',
]);
for (const path of group.files) assert.equal(assets.groups.core.files.includes(path), false, `${path} is not core`);
@@ -32,9 +32,9 @@ test('JamesDSP resolves every module dependency through the page build manifest'
assert.match(node, /globalThis\.Lazy\?\.url\?\.\(path\)/);
assert.match(node, /assetURL\('\/vendor\/jamesdsp\/dsp\/jamesdsp\.wasm'/);
assert.match(node, /assetURL\('\/vendor\/jamesdsp\/params\.mjs'/);
assert.match(node, /workletURL\.hash=new URLSearchParams/);
assert.match(worklet, /new URLSearchParams\(new URL\(import\.meta\.url\)\.hash\.slice\(1\)\)/);
assert.match(worklet, /await import\(engineURL\)/);
assert.match(node, /processorOptions:\{wasmBytes\}/);
assert.match(worklet, /import createJamesDSP from '\.\/dsp\/jamesdsp-77be0b2\.mjs'/);
assert.doesNotMatch(worklet, /import\(/);
const feature = readFileSync(join(root, 'vendor/jamesdsp/jamesdsp-feature.js'), 'utf8');
assert.match(feature, /Lazy\.url\('\/vendor\/jamesdsp\/jamesdsp-node\.mjs'\)/);
assert.match(feature, /Lazy\.url\('\/vendor\/jamesdsp\/dsp\/jamesdsp\.wasm'\)/);