@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/esm-bundle/index.js
CHANGED
|
@@ -10980,7 +10980,6 @@ var FaustPolyScriptProcessorNode = class extends FaustScriptProcessorNode {
|
|
|
10980
10980
|
};
|
|
10981
10981
|
|
|
10982
10982
|
// src/FaustDspGenerator.ts
|
|
10983
|
-
var import_meta = {};
|
|
10984
10983
|
var _FaustMonoDspGenerator = class _FaustMonoDspGenerator {
|
|
10985
10984
|
constructor() {
|
|
10986
10985
|
this.factory = null;
|
|
@@ -11337,7 +11336,10 @@ process = adaptorIns(dsp_code.process) : dsp_code.effect : adaptorOuts;
|
|
|
11337
11336
|
}
|
|
11338
11337
|
}
|
|
11339
11338
|
} catch (e) {
|
|
11340
|
-
|
|
11339
|
+
const errorMessage = e instanceof Error ? e.message : String(e != null ? e : "unknown error");
|
|
11340
|
+
if (!errorMessage.includes("undefined symbol : effect")) {
|
|
11341
|
+
console.warn(e);
|
|
11342
|
+
}
|
|
11341
11343
|
this.voiceFactory = await compiler.createPolyDSPFactory(
|
|
11342
11344
|
name,
|
|
11343
11345
|
dspCodeAux,
|
|
@@ -11629,38 +11631,20 @@ var _FaustDspGenerator = class _FaustDspGenerator {
|
|
|
11629
11631
|
async createFaustNode(context, name, code, sp, bufferSize) {
|
|
11630
11632
|
const getCompiler = async () => {
|
|
11631
11633
|
if (!_FaustDspGenerator.compilerPromise) {
|
|
11632
|
-
const
|
|
11633
|
-
if (
|
|
11634
|
-
|
|
11635
|
-
|
|
11636
|
-
|
|
11637
|
-
|
|
11638
|
-
|
|
11639
|
-
|
|
11640
|
-
|
|
11641
|
-
|
|
11642
|
-
|
|
11643
|
-
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
wasmURL
|
|
11647
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
11648
|
-
} else {
|
|
11649
|
-
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
11650
|
-
if (!baseURL)
|
|
11651
|
-
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
11652
|
-
const jsURL = new URL(
|
|
11653
|
-
"../libfaust-wasm/libfaust-wasm.js",
|
|
11654
|
-
baseURL
|
|
11655
|
-
).href;
|
|
11656
|
-
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
11657
|
-
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
11658
|
-
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
11659
|
-
jsURL,
|
|
11660
|
-
dataURL,
|
|
11661
|
-
wasmURL
|
|
11662
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
11663
|
-
}
|
|
11634
|
+
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
11635
|
+
if (!baseURL)
|
|
11636
|
+
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
11637
|
+
const jsURL = new URL(
|
|
11638
|
+
"../libfaust-wasm/libfaust-wasm.js",
|
|
11639
|
+
baseURL
|
|
11640
|
+
).href;
|
|
11641
|
+
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
11642
|
+
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
11643
|
+
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
11644
|
+
jsURL,
|
|
11645
|
+
dataURL,
|
|
11646
|
+
wasmURL
|
|
11647
|
+
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
11664
11648
|
}
|
|
11665
11649
|
return _FaustDspGenerator.compilerPromise;
|
|
11666
11650
|
};
|