@grame/faustwasm 0.0.53 → 0.0.55

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.
@@ -1278,7 +1278,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
1278
1278
  mixerBuffer: Uint8Array;
1279
1279
  mixerModule: WebAssembly.Module;
1280
1280
  constructor();
1281
- compile(compiler: IFaustCompiler, name: string, dspCode: string, args: string, effectCode?: string): Promise<this | null>;
1281
+ compile(compiler: IFaustCompiler, name: string, dspCodeAux: string, args: string, effectCode?: string): Promise<this | null>;
1282
1282
  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>;
1283
1283
  createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
1284
1284
  new (options: AudioWorkletNodeOptions): AudioWorkletProcessor;
@@ -3636,16 +3636,26 @@ var _FaustPolyDspGenerator = class {
3636
3636
  this.voiceFactory = null;
3637
3637
  this.effectFactory = null;
3638
3638
  }
3639
- async compile(compiler, name, dspCode, args, effectCode = `
3640
- adapt(1,1) = _; adapt(2,2) = _,_; adapt(1,2) = _ <: _,_; adapt(2,1) = _,_ :> _;
3641
- adaptor(F,G) = adapt(outputs(F),inputs(G));
3642
- dsp_code = environment{${dspCode}};
3643
- process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
3639
+ async compile(compiler, name, dspCodeAux, args, effectCode = `
3640
+ dsp_code = environment{
3641
+ ${dspCodeAux}
3642
+ };
3643
+ process = dsp_code.effect;`) {
3644
+ const dspCode = `
3645
+ adapt(1,1) = _;
3646
+ adapt(2,2) = _,_;
3647
+ adapt(1,2) = _ <: _,_;
3648
+ adapt(2,1) = _,_ :> _;
3649
+ adaptor(F,G) = adapt(outputs(F),inputs(G));
3650
+ dsp_code = environment{
3651
+ ${dspCodeAux}
3652
+ };
3653
+ process = dsp_code.process : adaptor(dsp_code.process, dsp_code.effect);`;
3644
3654
  this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
3645
3655
  if (!this.voiceFactory)
3646
3656
  return null;
3647
3657
  try {
3648
- this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
3658
+ this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args + " -inpl");
3649
3659
  } catch (e) {
3650
3660
  console.warn(e);
3651
3661
  }