@grame/faustwasm 0.0.53 → 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/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 +18 -6
- 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 +18 -6
- 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-bundle/index.js
CHANGED
|
@@ -8482,8 +8482,11 @@ this.fAudioMixingHalf: ${this.fAudioMixingHalf}`;
|
|
|
8482
8482
|
}
|
|
8483
8483
|
}
|
|
8484
8484
|
});
|
|
8485
|
-
if (this.fInstance.effectAPI)
|
|
8485
|
+
if (this.fInstance.effectAPI) {
|
|
8486
|
+
console.log("effectAPI.getNumInputs() = %d", this.fInstance.effectAPI.getNumInputs(this.fEffect));
|
|
8487
|
+
console.log("effectAPI.getNumOutputs() = %d", this.fInstance.effectAPI.getNumOutputs(this.fEffect));
|
|
8486
8488
|
this.fInstance.effectAPI.compute(this.fEffect, this.fBufferSize, this.fAudioOutputs, this.fAudioOutputs);
|
|
8489
|
+
}
|
|
8487
8490
|
this.updateOutputs();
|
|
8488
8491
|
if (output !== void 0) {
|
|
8489
8492
|
for (let chan = 0; chan < Math.min(this.getNumOutputs(), output.length); chan++) {
|
|
@@ -8501,7 +8504,11 @@ this.fAudioMixingHalf: ${this.fAudioMixingHalf}`;
|
|
|
8501
8504
|
return this.fInstance.voiceAPI.getNumInputs(0);
|
|
8502
8505
|
}
|
|
8503
8506
|
getNumOutputs() {
|
|
8504
|
-
|
|
8507
|
+
if (this.fInstance.effectAPI) {
|
|
8508
|
+
console.log("effectAPI.getNumOutputs() = %d", this.fInstance.effectAPI.getNumOutputs(this.fEffect));
|
|
8509
|
+
console.log("VOICE.getNumOutputs() = %d", this.fInstance.voiceAPI.getNumOutputs(0));
|
|
8510
|
+
}
|
|
8511
|
+
return this.fInstance.effectAPI ? this.fInstance.effectAPI.getNumOutputs(this.fEffect) : this.fInstance.voiceAPI.getNumOutputs(0);
|
|
8505
8512
|
}
|
|
8506
8513
|
static findPath(o, p) {
|
|
8507
8514
|
if (typeof o !== "object") {
|
|
@@ -9662,10 +9669,15 @@ const dependencies = {
|
|
|
9662
9669
|
this.effectFactory = null;
|
|
9663
9670
|
}
|
|
9664
9671
|
async compile(compiler, name, dspCode, args, effectCode = `
|
|
9665
|
-
adapt(1,1) = _;
|
|
9666
|
-
|
|
9667
|
-
|
|
9668
|
-
|
|
9672
|
+
adapt(1,1) = _;
|
|
9673
|
+
adapt(2,2) = _,_;
|
|
9674
|
+
adapt(1,2) = _ <: _,_;
|
|
9675
|
+
adapt(2,1) = _,_ :> _;
|
|
9676
|
+
adaptor(F,G) = adapt(outputs(F),inputs(G));
|
|
9677
|
+
dsp_code = environment{
|
|
9678
|
+
${dspCode}
|
|
9679
|
+
};
|
|
9680
|
+
process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
|
|
9669
9681
|
this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
|
|
9670
9682
|
if (!this.voiceFactory)
|
|
9671
9683
|
return null;
|