@grame/faustwasm 0.13.3 → 0.13.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grame/faustwasm",
3
- "version": "0.13.3",
3
+ "version": "0.13.4",
4
4
  "description": "WebAssembly version of Faust Compiler",
5
5
  "main": "dist/cjs/index.js",
6
6
  "types": "dist/esm/index.d.ts",
File without changes
File without changes
File without changes
@@ -741,7 +741,13 @@ process = adaptorIns(dsp_code.process) : dsp_code.effect : adaptorOuts;
741
741
  }
742
742
  }
743
743
  } catch (e) {
744
- console.warn(e);
744
+ // Hack to detect 'undefined effect' symbol error, when no effect is defined in the polyphonic code.
745
+ // The error message is not printed to avoid confusing the user.
746
+ const errorMessage =
747
+ e instanceof Error ? e.message : String(e ?? 'unknown error');
748
+ if (!errorMessage.includes('undefined symbol : effect')) {
749
+ console.warn(e);
750
+ }
745
751
  this.voiceFactory = await compiler.createPolyDSPFactory(
746
752
  name,
747
753
  dspCodeAux,
@@ -5548,7 +5548,10 @@ process = adaptorIns(dsp_code.process) : dsp_code.effect : adaptorOuts;
5548
5548
  }
5549
5549
  }
5550
5550
  } catch (e) {
5551
- console.warn(e);
5551
+ const errorMessage = e instanceof Error ? e.message : String(e != null ? e : "unknown error");
5552
+ if (!errorMessage.includes("undefined symbol : effect")) {
5553
+ console.warn(e);
5554
+ }
5552
5555
  this.voiceFactory = await compiler.createPolyDSPFactory(
5553
5556
  name,
5554
5557
  dspCodeAux,