@grame/faustwasm 0.13.2 → 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.
@@ -11026,7 +11026,6 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
11026
11026
  };
11027
11027
 
11028
11028
  // src/FaustDspGenerator.ts
11029
- var import_meta = {};
11030
11029
  var _FaustMonoDspGenerator = class _FaustMonoDspGenerator {
11031
11030
  constructor() {
11032
11031
  this.factory = null;
@@ -11383,7 +11382,10 @@ process = adaptorIns(dsp_code.process) : dsp_code.effect : adaptorOuts;
11383
11382
  }
11384
11383
  }
11385
11384
  } catch (e) {
11386
- console.warn(e);
11385
+ const errorMessage = e instanceof Error ? e.message : String(e != null ? e : "unknown error");
11386
+ if (!errorMessage.includes("undefined symbol : effect")) {
11387
+ console.warn(e);
11388
+ }
11387
11389
  this.voiceFactory = await compiler.createPolyDSPFactory(
11388
11390
  name,
11389
11391
  dspCodeAux,
@@ -11675,38 +11677,20 @@ const dependencies = {
11675
11677
  async createFaustNode(context, name, code, sp, bufferSize) {
11676
11678
  const getCompiler = async () => {
11677
11679
  if (!_FaustDspGenerator.compilerPromise) {
11678
- const isNode = typeof document === "undefined" && typeof window === "undefined";
11679
- if (isNode) {
11680
- const baseURL = (typeof __dirname !== "undefined" ? `file://${__dirname}/` : void 0) || (typeof import_meta !== "undefined" && typeof import_meta.url === "string" ? import_meta.url : void 0);
11681
- if (!baseURL)
11682
- throw new Error("Cannot resolve libfaust-wasm location.");
11683
- const jsURL = new URL(
11684
- "../libfaust-wasm/libfaust-wasm.js",
11685
- baseURL
11686
- ).href;
11687
- const dataURL = jsURL.replace(/c?js$/, "data");
11688
- const wasmURL = jsURL.replace(/c?js$/, "wasm");
11689
- _FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
11690
- jsURL,
11691
- dataURL,
11692
- wasmURL
11693
- ).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
11694
- } else {
11695
- const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
11696
- if (!baseURL)
11697
- throw new Error("Cannot resolve libfaust-wasm location.");
11698
- const jsURL = new URL(
11699
- "../libfaust-wasm/libfaust-wasm.js",
11700
- baseURL
11701
- ).href;
11702
- const dataURL = jsURL.replace(/c?js$/, "data");
11703
- const wasmURL = jsURL.replace(/c?js$/, "wasm");
11704
- _FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
11705
- jsURL,
11706
- dataURL,
11707
- wasmURL
11708
- ).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
11709
- }
11680
+ const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
11681
+ if (!baseURL)
11682
+ throw new Error("Cannot resolve libfaust-wasm location.");
11683
+ const jsURL = new URL(
11684
+ "../libfaust-wasm/libfaust-wasm.js",
11685
+ baseURL
11686
+ ).href;
11687
+ const dataURL = jsURL.replace(/c?js$/, "data");
11688
+ const wasmURL = jsURL.replace(/c?js$/, "wasm");
11689
+ _FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
11690
+ jsURL,
11691
+ dataURL,
11692
+ wasmURL
11693
+ ).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
11710
11694
  }
11711
11695
  return _FaustDspGenerator.compilerPromise;
11712
11696
  };