Extend JamesDSP with convolution and spatial audio
This commit is contained in:
@@ -12,13 +12,17 @@ test('JamesDSP runtime files live only in a lazy background group', () => {
|
||||
assert.equal(group.contract, 1);
|
||||
assert.equal(group.eager, false);
|
||||
assert.equal(group.background, true);
|
||||
assert.equal(group.offlineOptIn, 'jamesDsp');
|
||||
assert.deepEqual(group.dependencies, ['feature:eq-core', 'feature:vocal-reducer']);
|
||||
assert.deepEqual(group.files, [
|
||||
'/vendor/jamesdsp/jamesdsp-feature.js',
|
||||
'/vendor/jamesdsp/jamesdsp-node.mjs',
|
||||
'/vendor/jamesdsp/params.mjs',
|
||||
'/vendor/jamesdsp/ir-utils.mjs',
|
||||
'/vendor/jamesdsp/ir-builtins.mjs',
|
||||
'/vendor/jamesdsp/ir-store.mjs',
|
||||
'/vendor/jamesdsp/worklet.mjs',
|
||||
'/vendor/jamesdsp/dsp/jamesdsp-77be0b2.mjs',
|
||||
'/vendor/jamesdsp/dsp/jamesdsp-a982b53.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`);
|
||||
@@ -33,24 +37,31 @@ test('JamesDSP resolves every module dependency through the page build manifest'
|
||||
assert.match(node, /assetURL\('\/vendor\/jamesdsp\/dsp\/jamesdsp\.wasm'/);
|
||||
assert.match(node, /assetURL\('\/vendor\/jamesdsp\/params\.mjs'/);
|
||||
assert.match(node, /processorOptions:\{wasmBytes\}/);
|
||||
assert.match(worklet, /import createJamesDSP from '\.\/dsp\/jamesdsp-77be0b2\.mjs'/);
|
||||
assert.match(worklet, /import createJamesDSP from '\.\/dsp\/jamesdsp-a982b53\.mjs'/);
|
||||
assert.doesNotMatch(worklet, /import\(/);
|
||||
assert.match(node, /context\.sampleRate<8000\|\|context\.sampleRate>96000/);
|
||||
assert.match(node, /!\[1,2,4\]\.includes\(buffer\.numberOfChannels\) \|\| buffer\.length>65536/);
|
||||
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'\)/);
|
||||
});
|
||||
|
||||
test('v1 wrapper rejects text effects and omits them from portable presets', () => {
|
||||
test('player wrapper rejects text effects while portable presets retain IR references', () => {
|
||||
const node = readFileSync(join(root, 'vendor/jamesdsp/jamesdsp-node.mjs'), 'utf8');
|
||||
const worklet = readFileSync(join(root, 'vendor/jamesdsp/worklet.mjs'), 'utf8');
|
||||
assert.match(node, /Text effects are disabled in this player version/);
|
||||
assert.match(node, /toJSON\(\) \{return \{version:1,params:/);
|
||||
assert.match(node, /toJSON\(\) \{return \{version:2,params:/);
|
||||
assert.match(node, /irCapFrames:view\.getUint32\(32,true\)/);
|
||||
assert.match(node, /getIR\(preset\.irRef\.name\)/);
|
||||
const feature = readFileSync(join(root, 'vendor/jamesdsp/jamesdsp-feature.js'), 'utf8');
|
||||
assert.match(feature, /async function prepareIR\(context, buffer, maxFrames = 65536\)/);
|
||||
assert.match(feature, /prepared\.length>Math\.min\(65536,maxFrames\)/);
|
||||
assert.doesNotMatch(worklet, /data\.type==='text'/);
|
||||
});
|
||||
|
||||
test('vendor provenance pins the source and retains both supplied license texts', () => {
|
||||
const version = readFileSync(join(root, 'vendor/jamesdsp/VERSION.txt'), 'utf8');
|
||||
assert.match(version, /77be0b2e825a20ba98feff33d16dd0a43232ef3b/);
|
||||
assert.match(version, /a982b53c4ab347d1d9c50f4ce7ee3c2735eaa817/);
|
||||
assert.match(version, /GPL-2\.0 text/);
|
||||
assert.ok(readFileSync(join(root, 'vendor/jamesdsp/LICENSE.txt'), 'utf8').includes('Version 3'));
|
||||
assert.ok(readFileSync(join(root, 'vendor/jamesdsp/UPSTREAM-MAIN-LICENSE.txt'), 'utf8').includes('Version 2'));
|
||||
|
||||
Reference in New Issue
Block a user