@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/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;
|
|
@@ -5870,38 +5869,20 @@ const dependencies = {
|
|
|
5870
5869
|
async createFaustNode(context, name, code, sp, bufferSize) {
|
|
5871
5870
|
const getCompiler = async () => {
|
|
5872
5871
|
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
|
-
}
|
|
5872
|
+
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
5873
|
+
if (!baseURL)
|
|
5874
|
+
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
5875
|
+
const jsURL = new URL(
|
|
5876
|
+
"../libfaust-wasm/libfaust-wasm.js",
|
|
5877
|
+
baseURL
|
|
5878
|
+
).href;
|
|
5879
|
+
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
5880
|
+
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
5881
|
+
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
5882
|
+
jsURL,
|
|
5883
|
+
dataURL,
|
|
5884
|
+
wasmURL
|
|
5885
|
+
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5905
5886
|
}
|
|
5906
5887
|
return _FaustDspGenerator.compilerPromise;
|
|
5907
5888
|
};
|