@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.
- package/assets/standalone/faustwasm/index.js +18 -34
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.js +18 -34
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.js +18 -34
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.js +18 -34
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.js +18 -34
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +1 -1
- package/scripts/faust2sndfile.js +0 -0
- package/scripts/faust2svg.js +0 -0
- package/scripts/faust2wasm.js +0 -0
- package/src/FaustDspGenerator.ts +33 -48
- package/test/faustlive-wasm/faustwasm/index.js +18 -34
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/web/create-faust-node.js +4 -3
package/dist/cjs/index.js
CHANGED
|
@@ -5221,7 +5221,6 @@ export default ${(_b = jsCode.match(jsCodeHead)) == null ? void 0 : _b[1]};
|
|
|
5221
5221
|
};
|
|
5222
5222
|
|
|
5223
5223
|
// src/FaustDspGenerator.ts
|
|
5224
|
-
var import_meta = {};
|
|
5225
5224
|
var _FaustMonoDspGenerator = class _FaustMonoDspGenerator {
|
|
5226
5225
|
constructor() {
|
|
5227
5226
|
this.factory = null;
|
|
@@ -5578,7 +5577,10 @@ process = adaptorIns(dsp_code.process) : dsp_code.effect : adaptorOuts;
|
|
|
5578
5577
|
}
|
|
5579
5578
|
}
|
|
5580
5579
|
} catch (e) {
|
|
5581
|
-
|
|
5580
|
+
const errorMessage = e instanceof Error ? e.message : String(e != null ? e : "unknown error");
|
|
5581
|
+
if (!errorMessage.includes("undefined symbol : effect")) {
|
|
5582
|
+
console.warn(e);
|
|
5583
|
+
}
|
|
5582
5584
|
this.voiceFactory = await compiler.createPolyDSPFactory(
|
|
5583
5585
|
name,
|
|
5584
5586
|
dspCodeAux,
|
|
@@ -5870,38 +5872,20 @@ const dependencies = {
|
|
|
5870
5872
|
async createFaustNode(context, name, code, sp, bufferSize) {
|
|
5871
5873
|
const getCompiler = async () => {
|
|
5872
5874
|
if (!_FaustDspGenerator.compilerPromise) {
|
|
5873
|
-
const
|
|
5874
|
-
if (
|
|
5875
|
-
|
|
5876
|
-
|
|
5877
|
-
|
|
5878
|
-
|
|
5879
|
-
|
|
5880
|
-
|
|
5881
|
-
|
|
5882
|
-
|
|
5883
|
-
|
|
5884
|
-
|
|
5885
|
-
|
|
5886
|
-
|
|
5887
|
-
wasmURL
|
|
5888
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5889
|
-
} else {
|
|
5890
|
-
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
5891
|
-
if (!baseURL)
|
|
5892
|
-
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
5893
|
-
const jsURL = new URL(
|
|
5894
|
-
"../libfaust-wasm/libfaust-wasm.js",
|
|
5895
|
-
baseURL
|
|
5896
|
-
).href;
|
|
5897
|
-
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
5898
|
-
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
5899
|
-
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
5900
|
-
jsURL,
|
|
5901
|
-
dataURL,
|
|
5902
|
-
wasmURL
|
|
5903
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5904
|
-
}
|
|
5875
|
+
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
5876
|
+
if (!baseURL)
|
|
5877
|
+
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
5878
|
+
const jsURL = new URL(
|
|
5879
|
+
"../libfaust-wasm/libfaust-wasm.js",
|
|
5880
|
+
baseURL
|
|
5881
|
+
).href;
|
|
5882
|
+
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
5883
|
+
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
5884
|
+
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
5885
|
+
jsURL,
|
|
5886
|
+
dataURL,
|
|
5887
|
+
wasmURL
|
|
5888
|
+
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5905
5889
|
}
|
|
5906
5890
|
return _FaustDspGenerator.compilerPromise;
|
|
5907
5891
|
};
|