@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;
package/dist/cjs/index.js CHANGED
@@ -3644,16 +3644,26 @@ const dependencies = {
3644
3644
  this.voiceFactory = null;
3645
3645
  this.effectFactory = null;
3646
3646
  }
3647
- async compile(compiler, name, dspCode, args, effectCode = `
3648
- adapt(1,1) = _; adapt(2,2) = _,_; adapt(1,2) = _ <: _,_; adapt(2,1) = _,_ :> _;
3649
- adaptor(F,G) = adapt(outputs(F),inputs(G));
3650
- dsp_code = environment{${dspCode}};
3651
- process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
3647
+ async compile(compiler, name, dspCodeAux, args, effectCode = `
3648
+ dsp_code = environment{
3649
+ ${dspCodeAux}
3650
+ };
3651
+ process = dsp_code.effect;`) {
3652
+ const dspCode = `
3653
+ adapt(1,1) = _;
3654
+ adapt(2,2) = _,_;
3655
+ adapt(1,2) = _ <: _,_;
3656
+ adapt(2,1) = _,_ :> _;
3657
+ adaptor(F,G) = adapt(outputs(F),inputs(G));
3658
+ dsp_code = environment{
3659
+ ${dspCodeAux}
3660
+ };
3661
+ process = dsp_code.process : adaptor(dsp_code.process, dsp_code.effect);`;
3652
3662
  this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
3653
3663
  if (!this.voiceFactory)
3654
3664
  return null;
3655
3665
  try {
3656
- this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
3666
+ this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args + " -inpl");
3657
3667
  } catch (e) {
3658
3668
  console.warn(e);
3659
3669
  }