@grame/faustwasm 0.0.55 → 0.0.56
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.d.ts +1 -1
- package/assets/standalone/faustwasm/index.js +4 -9
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -9
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +1 -1
- package/dist/cjs-bundle/index.js +4 -9
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -9
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +1 -1
- package/dist/esm-bundle/index.js +4 -9
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +6 -15
- package/test/faustlive-wasm/faustwasm/index.d.ts +1 -1
- package/test/faustlive-wasm/faustwasm/index.js +4 -9
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/bug.dsp +0 -18
|
@@ -1285,7 +1285,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
|
|
|
1285
1285
|
mixerBuffer: Uint8Array;
|
|
1286
1286
|
mixerModule: WebAssembly.Module;
|
|
1287
1287
|
constructor();
|
|
1288
|
-
compile(compiler: IFaustCompiler, name: string,
|
|
1288
|
+
compile(compiler: IFaustCompiler, name: string, dspCode: string, args: string, effectCode?: string): Promise<this | null>;
|
|
1289
1289
|
createNode<SP extends boolean = false>(context: BaseAudioContext, voices: number, name?: string, voiceFactory?: LooseFaustDspFactory, mixerModule?: WebAssembly.Module, effectFactory?: LooseFaustDspFactory | null, sp?: SP, bufferSize?: number, processorName?: string): Promise<SP extends true ? FaustPolyScriptProcessorNode | null : FaustPolyAudioWorkletNode | null>;
|
|
1290
1290
|
createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
|
|
1291
1291
|
new (options: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
package/dist/esm-bundle/index.js
CHANGED
|
@@ -9624,26 +9624,21 @@ var _FaustPolyDspGenerator = class {
|
|
|
9624
9624
|
this.voiceFactory = null;
|
|
9625
9625
|
this.effectFactory = null;
|
|
9626
9626
|
}
|
|
9627
|
-
async compile(compiler, name,
|
|
9628
|
-
dsp_code = environment{
|
|
9629
|
-
${dspCodeAux}
|
|
9630
|
-
};
|
|
9631
|
-
process = dsp_code.effect;`) {
|
|
9632
|
-
const dspCode = `
|
|
9627
|
+
async compile(compiler, name, dspCode, args, effectCode = `
|
|
9633
9628
|
adapt(1,1) = _;
|
|
9634
9629
|
adapt(2,2) = _,_;
|
|
9635
9630
|
adapt(1,2) = _ <: _,_;
|
|
9636
9631
|
adapt(2,1) = _,_ :> _;
|
|
9637
9632
|
adaptor(F,G) = adapt(outputs(F),inputs(G));
|
|
9638
9633
|
dsp_code = environment{
|
|
9639
|
-
${
|
|
9634
|
+
${dspCode}
|
|
9640
9635
|
};
|
|
9641
|
-
process =
|
|
9636
|
+
process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
|
|
9642
9637
|
this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
|
|
9643
9638
|
if (!this.voiceFactory)
|
|
9644
9639
|
return null;
|
|
9645
9640
|
try {
|
|
9646
|
-
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args
|
|
9641
|
+
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
|
|
9647
9642
|
} catch (e) {
|
|
9648
9643
|
console.warn(e);
|
|
9649
9644
|
}
|