@grame/faustwasm 0.0.28 → 0.0.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -3
- package/assets/standalone/faustwasm/index.js +18 -19
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.js +17 -18
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.js +1287 -3016
- package/dist/cjs-bundle/index.js.map +3 -3
- package/dist/esm/index.js +18 -19
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.js +1287 -3016
- package/dist/esm-bundle/index.js.map +3 -3
- package/libfaust-wasm/libfaust-wasm.data +0 -0
- package/libfaust-wasm/libfaust-wasm.js +3 -4
- package/libfaust-wasm/libfaust-wasm.wasm +0 -0
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +13 -13
- package/src/FaustDspInstance.ts +1 -3
- package/src/FaustWasmInstantiator.ts +1 -1
- package/src/exports.ts +24 -24
- package/test/faustlive-wasm/faustwasm/index.js +18 -19
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/t1.cjs +46 -0
- package/test/t1.js +46 -0
package/dist/cjs/index.js
CHANGED
|
@@ -1731,7 +1731,6 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
1731
1731
|
this.fExports.setParamValue($dsp, index, value);
|
|
1732
1732
|
}
|
|
1733
1733
|
};
|
|
1734
|
-
var FaustDspInstance_default = FaustDspInstance;
|
|
1735
1734
|
|
|
1736
1735
|
// src/FaustWasmInstantiator.ts
|
|
1737
1736
|
var FaustWasmInstantiator = class {
|
|
@@ -1821,7 +1820,7 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
1821
1820
|
}
|
|
1822
1821
|
static createMonoDSPInstanceAux(instance, json) {
|
|
1823
1822
|
const functions = instance.exports;
|
|
1824
|
-
const api = new
|
|
1823
|
+
const api = new FaustDspInstance(functions);
|
|
1825
1824
|
const memory = instance.exports.memory;
|
|
1826
1825
|
return { memory, api, json };
|
|
1827
1826
|
}
|
|
@@ -1884,12 +1883,12 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
1884
1883
|
const memory = this.createMemoryAux(voices, voiceFactory, effectFactory);
|
|
1885
1884
|
const voiceInstance = await WebAssembly.instantiate(voiceFactory.module, this.createWasmImport(memory));
|
|
1886
1885
|
const voiceFunctions = voiceInstance.exports;
|
|
1887
|
-
const voiceAPI = new
|
|
1886
|
+
const voiceAPI = new FaustDspInstance(voiceFunctions);
|
|
1888
1887
|
const mixerAPI = this.createMixerAux(mixerModule, memory);
|
|
1889
1888
|
if (effectFactory) {
|
|
1890
1889
|
const effectInstance = await WebAssembly.instantiate(effectFactory.module, this.createWasmImport(memory));
|
|
1891
1890
|
const effectFunctions = effectInstance.exports;
|
|
1892
|
-
const effectAPI = new
|
|
1891
|
+
const effectAPI = new FaustDspInstance(effectFunctions);
|
|
1893
1892
|
return {
|
|
1894
1893
|
memory,
|
|
1895
1894
|
voices,
|
|
@@ -1913,12 +1912,12 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
1913
1912
|
const memory = this.createMemoryAux(voices, voiceFactory, effectFactory);
|
|
1914
1913
|
const voiceInstance = new WebAssembly.Instance(voiceFactory.module, this.createWasmImport(memory));
|
|
1915
1914
|
const voiceFunctions = voiceInstance.exports;
|
|
1916
|
-
const voiceAPI = new
|
|
1915
|
+
const voiceAPI = new FaustDspInstance(voiceFunctions);
|
|
1917
1916
|
const mixerAPI = this.createMixerAux(mixerModule, memory);
|
|
1918
1917
|
if (effectFactory) {
|
|
1919
1918
|
const effectInstance = new WebAssembly.Instance(effectFactory.module, this.createWasmImport(memory));
|
|
1920
1919
|
const effectFunctions = effectInstance.exports;
|
|
1921
|
-
const effectAPI = new
|
|
1920
|
+
const effectAPI = new FaustDspInstance(effectFunctions);
|
|
1922
1921
|
return {
|
|
1923
1922
|
memory,
|
|
1924
1923
|
voices,
|
|
@@ -3507,15 +3506,15 @@ const faustData = ${JSON.stringify({
|
|
|
3507
3506
|
poly: false
|
|
3508
3507
|
})};
|
|
3509
3508
|
// Implementation needed classes of functions
|
|
3510
|
-
const ${
|
|
3509
|
+
const ${FaustDspInstance.name} = ${FaustDspInstance.toString()}
|
|
3511
3510
|
const ${FaustBaseWebAudioDsp.name} = ${FaustBaseWebAudioDsp.toString()}
|
|
3512
3511
|
const ${FaustMonoWebAudioDsp.name} = ${FaustMonoWebAudioDsp.toString()}
|
|
3513
3512
|
const ${FaustWasmInstantiator_default.name} = ${FaustWasmInstantiator_default.toString()}
|
|
3514
3513
|
// Put them in dependencies
|
|
3515
3514
|
const dependencies = {
|
|
3516
|
-
${FaustBaseWebAudioDsp.name},
|
|
3517
|
-
${FaustMonoWebAudioDsp.name},
|
|
3518
|
-
${FaustWasmInstantiator_default.name}
|
|
3515
|
+
FaustBaseWebAudioDsp: ${FaustBaseWebAudioDsp.name},
|
|
3516
|
+
FaustMonoWebAudioDsp: ${FaustMonoWebAudioDsp.name},
|
|
3517
|
+
FaustWasmInstantiator: ${FaustWasmInstantiator_default.name}
|
|
3519
3518
|
};
|
|
3520
3519
|
// Generate the actual AudioWorkletProcessor code
|
|
3521
3520
|
(${FaustAudioWorkletProcessor_default.toString()})(dependencies, faustData);
|
|
@@ -3550,16 +3549,16 @@ const faustData = ${JSON.stringify({
|
|
|
3550
3549
|
fftOptions
|
|
3551
3550
|
})};
|
|
3552
3551
|
// Implementation needed classes of functions
|
|
3553
|
-
const ${
|
|
3552
|
+
const ${FaustDspInstance.name} = ${FaustDspInstance.toString()}
|
|
3554
3553
|
const ${FaustBaseWebAudioDsp.name} = ${FaustBaseWebAudioDsp.toString()}
|
|
3555
3554
|
const ${FaustMonoWebAudioDsp.name} = ${FaustMonoWebAudioDsp.toString()}
|
|
3556
3555
|
const ${FaustWasmInstantiator_default.name} = ${FaustWasmInstantiator_default.toString()}
|
|
3557
3556
|
const FFTUtils = ${fftUtils.toString()}
|
|
3558
3557
|
// Put them in dependencies
|
|
3559
3558
|
const dependencies = {
|
|
3560
|
-
${FaustBaseWebAudioDsp.name},
|
|
3561
|
-
${FaustMonoWebAudioDsp.name},
|
|
3562
|
-
${FaustWasmInstantiator_default.name},
|
|
3559
|
+
FaustBaseWebAudioDsp: ${FaustBaseWebAudioDsp.name},
|
|
3560
|
+
FaustMonoWebAudioDsp: ${FaustMonoWebAudioDsp.name},
|
|
3561
|
+
FaustWasmInstantiator: ${FaustWasmInstantiator_default.name},
|
|
3563
3562
|
FFTUtils
|
|
3564
3563
|
};
|
|
3565
3564
|
// Generate the actual AudioWorkletProcessor code
|
|
@@ -3686,16 +3685,16 @@ const faustData = ${JSON.stringify({
|
|
|
3686
3685
|
effectMeta
|
|
3687
3686
|
})};
|
|
3688
3687
|
// Implementation needed classes of functions
|
|
3689
|
-
const ${
|
|
3688
|
+
const ${FaustDspInstance.name} = ${FaustDspInstance.toString()}
|
|
3690
3689
|
const ${FaustBaseWebAudioDsp.name} = ${FaustBaseWebAudioDsp.toString()}
|
|
3691
3690
|
const ${FaustPolyWebAudioDsp.name} = ${FaustPolyWebAudioDsp.toString()}
|
|
3692
3691
|
const ${FaustWebAudioDspVoice.name} = ${FaustWebAudioDspVoice.toString()}
|
|
3693
3692
|
const ${FaustWasmInstantiator_default.name} = ${FaustWasmInstantiator_default.toString()}
|
|
3694
3693
|
// Put them in dependencies
|
|
3695
3694
|
const dependencies = {
|
|
3696
|
-
${FaustBaseWebAudioDsp.name},
|
|
3697
|
-
${FaustPolyWebAudioDsp.name},
|
|
3698
|
-
${FaustWasmInstantiator_default.name}
|
|
3695
|
+
FaustBaseWebAudioDsp: ${FaustBaseWebAudioDsp.name},
|
|
3696
|
+
FaustPolyWebAudioDsp: ${FaustPolyWebAudioDsp.name},
|
|
3697
|
+
FaustWasmInstantiator: ${FaustWasmInstantiator_default.name}
|
|
3699
3698
|
};
|
|
3700
3699
|
// Generate the actual AudioWorkletProcessor code
|
|
3701
3700
|
(${FaustAudioWorkletProcessor_default.toString()})(dependencies, faustData);
|