@grame/faustwasm 0.13.2 → 0.13.3
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 +14 -33
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.js +14 -33
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.js +14 -33
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.js +14 -33
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.js +14 -33
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +26 -47
- package/test/faustlive-wasm/faustwasm/index.js +14 -33
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
package/dist/cjs-bundle/index.js
CHANGED
|
@@ -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;
|
|
@@ -11675,38 +11674,20 @@ const dependencies = {
|
|
|
11675
11674
|
async createFaustNode(context, name, code, sp, bufferSize) {
|
|
11676
11675
|
const getCompiler = async () => {
|
|
11677
11676
|
if (!_FaustDspGenerator.compilerPromise) {
|
|
11678
|
-
const
|
|
11679
|
-
if (
|
|
11680
|
-
|
|
11681
|
-
|
|
11682
|
-
|
|
11683
|
-
|
|
11684
|
-
|
|
11685
|
-
|
|
11686
|
-
|
|
11687
|
-
|
|
11688
|
-
|
|
11689
|
-
|
|
11690
|
-
|
|
11691
|
-
|
|
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
|
-
}
|
|
11677
|
+
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
11678
|
+
if (!baseURL)
|
|
11679
|
+
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
11680
|
+
const jsURL = new URL(
|
|
11681
|
+
"../libfaust-wasm/libfaust-wasm.js",
|
|
11682
|
+
baseURL
|
|
11683
|
+
).href;
|
|
11684
|
+
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
11685
|
+
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
11686
|
+
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
11687
|
+
jsURL,
|
|
11688
|
+
dataURL,
|
|
11689
|
+
wasmURL
|
|
11690
|
+
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
11710
11691
|
}
|
|
11711
11692
|
return _FaustDspGenerator.compilerPromise;
|
|
11712
11693
|
};
|