@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
|
@@ -5192,7 +5192,6 @@ var FaustPolyScriptProcessorNode = class extends FaustScriptProcessorNode {
|
|
|
5192
5192
|
};
|
|
5193
5193
|
|
|
5194
5194
|
// src/FaustDspGenerator.ts
|
|
5195
|
-
var import_meta = {};
|
|
5196
5195
|
var _FaustMonoDspGenerator = class _FaustMonoDspGenerator {
|
|
5197
5196
|
constructor() {
|
|
5198
5197
|
this.factory = null;
|
|
@@ -5841,38 +5840,20 @@ var _FaustDspGenerator = class _FaustDspGenerator {
|
|
|
5841
5840
|
async createFaustNode(context, name, code, sp, bufferSize) {
|
|
5842
5841
|
const getCompiler = async () => {
|
|
5843
5842
|
if (!_FaustDspGenerator.compilerPromise) {
|
|
5844
|
-
const
|
|
5845
|
-
if (
|
|
5846
|
-
|
|
5847
|
-
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
wasmURL
|
|
5859
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5860
|
-
} else {
|
|
5861
|
-
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
5862
|
-
if (!baseURL)
|
|
5863
|
-
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
5864
|
-
const jsURL = new URL(
|
|
5865
|
-
"../libfaust-wasm/libfaust-wasm.js",
|
|
5866
|
-
baseURL
|
|
5867
|
-
).href;
|
|
5868
|
-
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
5869
|
-
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
5870
|
-
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
5871
|
-
jsURL,
|
|
5872
|
-
dataURL,
|
|
5873
|
-
wasmURL
|
|
5874
|
-
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5875
|
-
}
|
|
5843
|
+
const baseURL = (typeof document !== "undefined" ? "src" in (document.currentScript || {}) ? document.currentScript.src : document.baseURI : void 0) || (typeof window !== "undefined" ? window.location.href : void 0);
|
|
5844
|
+
if (!baseURL)
|
|
5845
|
+
throw new Error("Cannot resolve libfaust-wasm location.");
|
|
5846
|
+
const jsURL = new URL(
|
|
5847
|
+
"../libfaust-wasm/libfaust-wasm.js",
|
|
5848
|
+
baseURL
|
|
5849
|
+
).href;
|
|
5850
|
+
const dataURL = jsURL.replace(/c?js$/, "data");
|
|
5851
|
+
const wasmURL = jsURL.replace(/c?js$/, "wasm");
|
|
5852
|
+
_FaustDspGenerator.compilerPromise = instantiateFaustModuleFromFile_default(
|
|
5853
|
+
jsURL,
|
|
5854
|
+
dataURL,
|
|
5855
|
+
wasmURL
|
|
5856
|
+
).then((module) => new FaustCompiler_default(new LibFaust_default(module)));
|
|
5876
5857
|
}
|
|
5877
5858
|
return _FaustDspGenerator.compilerPromise;
|
|
5878
5859
|
};
|