@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.
@@ -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, dspCodeAux: string, args: string, effectCode?: string): Promise<this | null>;
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;
@@ -9624,26 +9624,21 @@ var _FaustPolyDspGenerator = class {
9624
9624
  this.voiceFactory = null;
9625
9625
  this.effectFactory = null;
9626
9626
  }
9627
- async compile(compiler, name, dspCodeAux, args, effectCode = `
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
- ${dspCodeAux}
9634
+ ${dspCode}
9640
9635
  };
9641
- process = dsp_code.process : adaptor(dsp_code.process, dsp_code.effect);`;
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 + " -inpl");
9641
+ this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
9647
9642
  } catch (e) {
9648
9643
  console.warn(e);
9649
9644
  }