@grame/faustwasm 0.0.55 → 0.0.56
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.d.ts +1 -1
- package/assets/standalone/faustwasm/index.js +4 -9
- package/assets/standalone/faustwasm/index.js.map +2 -2
- package/dist/cjs/index.d.ts +1 -1
- package/dist/cjs/index.js +4 -9
- package/dist/cjs/index.js.map +2 -2
- package/dist/cjs-bundle/index.d.ts +1 -1
- package/dist/cjs-bundle/index.js +4 -9
- package/dist/cjs-bundle/index.js.map +2 -2
- package/dist/esm/index.d.ts +1 -1
- package/dist/esm/index.js +4 -9
- package/dist/esm/index.js.map +2 -2
- package/dist/esm-bundle/index.d.ts +1 -1
- package/dist/esm-bundle/index.js +4 -9
- package/dist/esm-bundle/index.js.map +2 -2
- package/package.json +1 -1
- package/src/FaustDspGenerator.ts +6 -15
- package/test/faustlive-wasm/faustwasm/index.d.ts +1 -1
- package/test/faustlive-wasm/faustwasm/index.js +4 -9
- package/test/faustlive-wasm/faustwasm/index.js.map +2 -2
- package/test/bug.dsp +0 -18
|
@@ -1285,7 +1285,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
|
|
|
1285
1285
|
mixerBuffer: Uint8Array;
|
|
1286
1286
|
mixerModule: WebAssembly.Module;
|
|
1287
1287
|
constructor();
|
|
1288
|
-
compile(compiler: IFaustCompiler, name: string,
|
|
1288
|
+
compile(compiler: IFaustCompiler, name: string, dspCode: string, args: string, effectCode?: string): Promise<this | null>;
|
|
1289
1289
|
createNode<SP extends boolean = false>(context: BaseAudioContext, voices: number, name?: string, voiceFactory?: LooseFaustDspFactory, mixerModule?: WebAssembly.Module, effectFactory?: LooseFaustDspFactory | null, sp?: SP, bufferSize?: number, processorName?: string): Promise<SP extends true ? FaustPolyScriptProcessorNode | null : FaustPolyAudioWorkletNode | null>;
|
|
1290
1290
|
createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
|
|
1291
1291
|
new (options: AudioWorkletNodeOptions): AudioWorkletProcessor;
|
package/dist/cjs-bundle/index.js
CHANGED
|
@@ -9661,26 +9661,21 @@ const dependencies = {
|
|
|
9661
9661
|
this.voiceFactory = null;
|
|
9662
9662
|
this.effectFactory = null;
|
|
9663
9663
|
}
|
|
9664
|
-
async compile(compiler, name,
|
|
9665
|
-
dsp_code = environment{
|
|
9666
|
-
${dspCodeAux}
|
|
9667
|
-
};
|
|
9668
|
-
process = dsp_code.effect;`) {
|
|
9669
|
-
const dspCode = `
|
|
9664
|
+
async compile(compiler, name, dspCode, args, effectCode = `
|
|
9670
9665
|
adapt(1,1) = _;
|
|
9671
9666
|
adapt(2,2) = _,_;
|
|
9672
9667
|
adapt(1,2) = _ <: _,_;
|
|
9673
9668
|
adapt(2,1) = _,_ :> _;
|
|
9674
9669
|
adaptor(F,G) = adapt(outputs(F),inputs(G));
|
|
9675
9670
|
dsp_code = environment{
|
|
9676
|
-
${
|
|
9671
|
+
${dspCode}
|
|
9677
9672
|
};
|
|
9678
|
-
process =
|
|
9673
|
+
process = adaptor(dsp_code.process, dsp_code.effect) : dsp_code.effect;`) {
|
|
9679
9674
|
this.voiceFactory = await compiler.createPolyDSPFactory(name, dspCode, args);
|
|
9680
9675
|
if (!this.voiceFactory)
|
|
9681
9676
|
return null;
|
|
9682
9677
|
try {
|
|
9683
|
-
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args
|
|
9678
|
+
this.effectFactory = await compiler.createPolyDSPFactory(name, effectCode, args);
|
|
9684
9679
|
} catch (e) {
|
|
9685
9680
|
console.warn(e);
|
|
9686
9681
|
}
|