@grame/faustwasm 0.0.52 → 0.0.54
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 +2 -1
- package/assets/standalone/faustwasm/index.js +18 -6
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.js +18 -6
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.js +19 -7
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.js +18 -6
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.js +19 -7
- package/dist/esm-bundle/index.js.map +2 -2
- package/libfaust-wasm/libfaust-wasm.js +1 -1
- package/libfaust-wasm/libfaust-wasm.wasm +0 -0
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +11 -5
- package/test/faustlive-wasm/faustwasm/index.js +18 -6
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
package/dist/cjs/index.js
CHANGED
|
@@ -2465,8 +2465,11 @@ this.fAudioMixingHalf: ${this.fAudioMixingHalf}`;
|
|
|
2465
2465
|
}
|
|
2466
2466
|
}
|
|
2467
2467
|
});
|
|
2468
|
-
if (this.fInstance.effectAPI)
|
|
2468
|
+
if (this.fInstance.effectAPI) {
|
|
2469
|
+
console.log("effectAPI.getNumInputs() = %d", this.fInstance.effectAPI.getNumInputs(this.fEffect));
|
|
2470
|
+
console.log("effectAPI.getNumOutputs() = %d", this.fInstance.effectAPI.getNumOutputs(this.fEffect));
|
|
2469
2471
|
this.fInstance.effectAPI.compute(this.fEffect, this.fBufferSize, this.fAudioOutputs, this.fAudioOutputs);
|
|
2472
|
+
}
|
|
2470
2473
|
this.updateOutputs();
|
|
2471
2474
|
if (output !== void 0) {
|
|
2472
2475
|
for (let chan = 0; chan < Math.min(this.getNumOutputs(), output.length); chan++) {
|
|
@@ -2484,7 +2487,11 @@ this.fAudioMixingHalf: ${this.fAudioMixingHalf}`;
|
|
|
2484
2487
|
return this.fInstance.voiceAPI.getNumInputs(0);
|
|
2485
2488
|
}
|
|
2486
2489
|
getNumOutputs() {
|
|
2487
|
-
|
|
2490
|
+
if (this.fInstance.effectAPI) {
|
|
2491
|
+
console.log("effectAPI.getNumOutputs() = %d", this.fInstance.effectAPI.getNumOutputs(this.fEffect));
|
|
2492
|
+
console.log("VOICE.getNumOutputs() = %d", this.fInstance.voiceAPI.getNumOutputs(0));
|
|
2493
|
+
}
|
|
2494
|
+
return this.fInstance.effectAPI ? this.fInstance.effectAPI.getNumOutputs(this.fEffect) : this.fInstance.voiceAPI.getNumOutputs(0);
|
|
2488
2495
|
}
|
|
2489
2496
|
static findPath(o, p) {
|
|
2490
2497
|
if (typeof o !== "object") {
|
|
@@ -3645,10 +3652,15 @@ const dependencies = {
|
|
|
3645
3652
|
this.effectFactory = null;
|
|
3646
3653
|
}
|
|
3647
3654
|
async compile(compiler, name, dspCode, args, effectCode = `
|
|
3648
|
-
adapt(1,1) = _;
|
|
3649
|
-
|
|
3650
|
-
|
|
3651
|
-
|
|
3655
|
+
adapt(1,1) = _;
|
|
3656
|
+
adapt(2,2) = _,_;
|
|
3657
|
+
adapt(1,2) = _ <: _,_;
|
|
3658
|
+
adapt(2,1) = _,_ :> _;
|
|
3659
|
+
adaptor(F,G) = adapt(outputs(F),inputs(G));
|
|
3660
|
+
dsp_code = environment{
|
|
3661
|
+
${dspCode}
|
|
3662
|
+
};
|
|
3663
|
+
process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
|
|
3652
3664
|
this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
|
|
3653
3665
|
if (!this.voiceFactory)
|
|
3654
3666
|
return null;
|