@grame/faustwasm 0.7.4 → 0.7.6

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.
Files changed (36) hide show
  1. package/assets/standalone/faustwasm/index.d.ts +15 -11
  2. package/assets/standalone/faustwasm/index.js.map +1 -1
  3. package/assets/standalone/index-pwa.js +9 -9
  4. package/dist/cjs/index.d.ts +15 -11
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs-bundle/index.d.ts +18 -14
  7. package/dist/cjs-bundle/index.js +4 -4
  8. package/dist/cjs-bundle/index.js.map +2 -2
  9. package/dist/esm/index.d.ts +15 -11
  10. package/dist/esm/index.js.map +1 -1
  11. package/dist/esm-bundle/index.d.ts +18 -14
  12. package/dist/esm-bundle/index.js +4 -4
  13. package/dist/esm-bundle/index.js.map +2 -2
  14. package/libfaust-wasm/libfaust-wasm.data +0 -0
  15. package/libfaust-wasm/libfaust-wasm.js +1 -1
  16. package/libfaust-wasm/libfaust-wasm.wasm +0 -0
  17. package/package.json +1 -1
  18. package/test/faustlive-wasm/faustwasm/index.d.ts +15 -11
  19. package/test/faustlive-wasm/faustwasm/index.js.map +1 -1
  20. package/test/max_bug/create-node.js +0 -140
  21. package/test/max_bug/dsp-meta.json +0 -247
  22. package/test/max_bug/dsp-module.wasm +0 -0
  23. package/test/max_bug/faust-ui/index.css +0 -442
  24. package/test/max_bug/faust-ui/index.css.map +0 -1
  25. package/test/max_bug/faust-ui/index.d.ts +0 -1
  26. package/test/max_bug/faust-ui/index.js +0 -3844
  27. package/test/max_bug/faust-ui/index.js.map +0 -1
  28. package/test/max_bug/faustwasm/index.d.ts +0 -1585
  29. package/test/max_bug/faustwasm/index.js +0 -4646
  30. package/test/max_bug/faustwasm/index.js.map +0 -7
  31. package/test/max_bug/icon.png +0 -0
  32. package/test/max_bug/index.html +0 -76
  33. package/test/max_bug/index.js +0 -149
  34. package/test/max_bug/manifest.json +0 -17
  35. package/test/max_bug/service-worker.js +0 -73
  36. package/test/max_bug.dsp +0 -13
@@ -110,7 +110,7 @@ export interface LooseFaustDspFactory {
110
110
  /** a unique identifier */
111
111
  shaKey?: string;
112
112
  /** a map of transferable audio buffers for the `soundfile` function */
113
- soundfiles: Record<string, (AudioData | null)>;
113
+ soundfiles: Record<string, (AudioData$1 | null)>;
114
114
  }
115
115
  export interface FaustDspMeta {
116
116
  name: string;
@@ -219,7 +219,7 @@ export declare const FFTUtils: {
219
219
  /** Convert from Faust processor's output to direct audio output, real/imag are readonly, fft length = fftSize = (real/imag length - 1) * 2 */
220
220
  signalToNoFFT: (real: Float32Array | Float64Array, imag: Float32Array | Float64Array, fft: Float32Array | Float64Array) => any;
221
221
  };
222
- export interface AudioData {
222
+ interface AudioData$1 {
223
223
  sampleRate: number;
224
224
  audioBuffer: Float32Array[];
225
225
  }
@@ -476,9 +476,9 @@ export declare class Soundfile {
476
476
  constructor(allocator: WasmAllocator, sampleSize: number, curChan: number, length: number, maxChan: number, totalParts: number);
477
477
  private allocBuffers;
478
478
  shareBuffers(curChan: number, maxChan: number): void;
479
- copyToOut(part: number, maxChannels: number, offset: number, audioData: AudioData): void;
480
- copyToOutReal32(maxChannels: number, offset: number, audioData: AudioData): void;
481
- copyToOutReal64(maxChannels: number, offset: number, audioData: AudioData): void;
479
+ copyToOut(part: number, maxChannels: number, offset: number, audioData: AudioData$1): void;
480
+ copyToOutReal32(maxChannels: number, offset: number, audioData: AudioData$1): void;
481
+ copyToOutReal64(maxChannels: number, offset: number, audioData: AudioData$1): void;
482
482
  emptyFile(part: number, offset: number): number;
483
483
  displayMemory(where?: string, mem?: boolean): void;
484
484
  getPtr(): number;
@@ -966,7 +966,7 @@ export declare class LibFaust implements ILibFaust {
966
966
  toString(): string;
967
967
  }
968
968
  export declare const ab2str: (buf: Uint8Array) => any;
969
- export declare const str2ab: (str: string) => Uint8Array;
969
+ export declare const str2ab: (str: string) => Uint8Array<ArrayBuffer>;
970
970
  export interface IFaustCompiler {
971
971
  /**
972
972
  * Gives the Faust compiler version.
@@ -1080,11 +1080,11 @@ export declare class FaustCompiler implements IFaustCompiler {
1080
1080
  deleteAllDSPFactories(): void;
1081
1081
  fs(): typeof FS;
1082
1082
  getAsyncInternalMixerModule(isDouble?: boolean): Promise<{
1083
- mixerBuffer: Uint8Array;
1083
+ mixerBuffer: Uint8Array<ArrayBufferLike>;
1084
1084
  mixerModule: WebAssembly.Module;
1085
1085
  }>;
1086
1086
  getSyncInternalMixerModule(isDouble?: boolean): {
1087
- mixerBuffer: Uint8Array;
1087
+ mixerBuffer: Uint8Array<ArrayBufferLike>;
1088
1088
  mixerModule: WebAssembly.Module;
1089
1089
  };
1090
1090
  }
@@ -1402,7 +1402,7 @@ export interface GeneratorSupportingSoundfiles {
1402
1402
  *
1403
1403
  * @param soundfileMap a map of id - `AudioData` as an object where `AudioData` contains channel data as `audioBuffer: Float32Array[]` and `sampleRate: number`
1404
1404
  */
1405
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1405
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1406
1406
  /**
1407
1407
  * Get a list of soundfiles needed, call after `compile()`
1408
1408
  */
@@ -1545,7 +1545,7 @@ export declare class FaustMonoDspGenerator implements IFaustMonoDspGenerator {
1545
1545
  factory: FaustDspFactory | null;
1546
1546
  constructor();
1547
1547
  compile(compiler: IFaustCompiler, name: string, code: string, args: string): Promise<this | null>;
1548
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1548
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1549
1549
  getSoundfileList(): string[];
1550
1550
  createNode<SP extends boolean = false>(context: BaseAudioContext, name?: string, factory?: LooseFaustDspFactory, sp?: SP, bufferSize?: number, processorName?: string, processorOptions?: Record<string, any>): Promise<SP extends true ? FaustMonoScriptProcessorNode | null : FaustMonoAudioWorkletNode | null>;
1551
1551
  createFFTNode(context: BaseAudioContext, fftUtils: typeof FFTUtils, name?: string, factory?: LooseFaustDspFactory, fftOptions?: Partial<FaustFFTOptionsData>, processorName?: string, processorOptions?: Record<string, any>): Promise<FaustMonoAudioWorkletNode | null>;
@@ -1568,7 +1568,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
1568
1568
  mixerModule: WebAssembly.Module;
1569
1569
  constructor();
1570
1570
  compile(compiler: IFaustCompiler, name: string, dspCodeAux: string, args: string, effectCodeAux?: string): Promise<this | null>;
1571
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1571
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1572
1572
  getSoundfileList(): string[];
1573
1573
  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, processorOptions?: {}): Promise<SP extends true ? FaustPolyScriptProcessorNode | null : FaustPolyAudioWorkletNode | null>;
1574
1574
  createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
@@ -1582,4 +1582,8 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
1582
1582
  getUI(): FaustUIDescriptor;
1583
1583
  }
1584
1584
 
1585
+ export {
1586
+ AudioData$1 as AudioData,
1587
+ };
1588
+
1585
1589
  export {};