@grame/faustwasm 0.7.3 → 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.
@@ -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,17 +219,17 @@ 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
  }
226
226
  export declare const FaustModuleFactoryFn: FaustModuleFactory;
227
- export declare const FaustModuleFactoryWasm: Uint8Array;
228
- export declare const FaustModuleFactoryData: Uint8Array;
227
+ export declare const FaustModuleFactoryWasm: Uint8Array<ArrayBufferLike>;
228
+ export declare const FaustModuleFactoryData: Uint8Array<ArrayBufferLike>;
229
229
  /**
230
230
  * Instantiate `FaustModule` using bundled binaries. Module constructor and files can be overriden.
231
231
  */
232
- export declare const instantiateFaustModule: (FaustModuleFactoryIn?: FaustModuleFactory, dataBinaryIn?: Uint8Array, wasmBinaryIn?: Uint8Array) => Promise<FaustModule>;
232
+ export declare const instantiateFaustModule: (FaustModuleFactoryIn?: FaustModuleFactory, dataBinaryIn?: Uint8Array<ArrayBufferLike>, wasmBinaryIn?: Uint8Array<ArrayBufferLike>) => Promise<FaustModule>;
233
233
  /**
234
234
  * Load libfaust-wasm files, than instantiate libFaust
235
235
  * @param jsFile path to `libfaust-wasm.js`
@@ -483,9 +483,9 @@ export declare class Soundfile {
483
483
  constructor(allocator: WasmAllocator, sampleSize: number, curChan: number, length: number, maxChan: number, totalParts: number);
484
484
  private allocBuffers;
485
485
  shareBuffers(curChan: number, maxChan: number): void;
486
- copyToOut(part: number, maxChannels: number, offset: number, audioData: AudioData): void;
487
- copyToOutReal32(maxChannels: number, offset: number, audioData: AudioData): void;
488
- copyToOutReal64(maxChannels: number, offset: number, audioData: AudioData): void;
486
+ copyToOut(part: number, maxChannels: number, offset: number, audioData: AudioData$1): void;
487
+ copyToOutReal32(maxChannels: number, offset: number, audioData: AudioData$1): void;
488
+ copyToOutReal64(maxChannels: number, offset: number, audioData: AudioData$1): void;
489
489
  emptyFile(part: number, offset: number): number;
490
490
  displayMemory(where?: string, mem?: boolean): void;
491
491
  getPtr(): number;
@@ -973,7 +973,7 @@ export declare class LibFaust implements ILibFaust {
973
973
  toString(): string;
974
974
  }
975
975
  export declare const ab2str: (buf: Uint8Array) => any;
976
- export declare const str2ab: (str: string) => Uint8Array;
976
+ export declare const str2ab: (str: string) => Uint8Array<ArrayBuffer>;
977
977
  export interface IFaustCompiler {
978
978
  /**
979
979
  * Gives the Faust compiler version.
@@ -1087,11 +1087,11 @@ export declare class FaustCompiler implements IFaustCompiler {
1087
1087
  deleteAllDSPFactories(): void;
1088
1088
  fs(): typeof FS;
1089
1089
  getAsyncInternalMixerModule(isDouble?: boolean): Promise<{
1090
- mixerBuffer: Uint8Array;
1090
+ mixerBuffer: Uint8Array<ArrayBufferLike>;
1091
1091
  mixerModule: WebAssembly.Module;
1092
1092
  }>;
1093
1093
  getSyncInternalMixerModule(isDouble?: boolean): {
1094
- mixerBuffer: Uint8Array;
1094
+ mixerBuffer: Uint8Array<ArrayBufferLike>;
1095
1095
  mixerModule: WebAssembly.Module;
1096
1096
  };
1097
1097
  }
@@ -1409,7 +1409,7 @@ export interface GeneratorSupportingSoundfiles {
1409
1409
  *
1410
1410
  * @param soundfileMap a map of id - `AudioData` as an object where `AudioData` contains channel data as `audioBuffer: Float32Array[]` and `sampleRate: number`
1411
1411
  */
1412
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1412
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1413
1413
  /**
1414
1414
  * Get a list of soundfiles needed, call after `compile()`
1415
1415
  */
@@ -1552,7 +1552,7 @@ export declare class FaustMonoDspGenerator implements IFaustMonoDspGenerator {
1552
1552
  factory: FaustDspFactory | null;
1553
1553
  constructor();
1554
1554
  compile(compiler: IFaustCompiler, name: string, code: string, args: string): Promise<this | null>;
1555
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1555
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1556
1556
  getSoundfileList(): string[];
1557
1557
  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>;
1558
1558
  createFFTNode(context: BaseAudioContext, fftUtils: typeof FFTUtils, name?: string, factory?: LooseFaustDspFactory, fftOptions?: Partial<FaustFFTOptionsData>, processorName?: string, processorOptions?: Record<string, any>): Promise<FaustMonoAudioWorkletNode | null>;
@@ -1575,7 +1575,7 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
1575
1575
  mixerModule: WebAssembly.Module;
1576
1576
  constructor();
1577
1577
  compile(compiler: IFaustCompiler, name: string, dspCodeAux: string, args: string, effectCodeAux?: string): Promise<this | null>;
1578
- addSoundfiles(soundfileMap: Record<string, AudioData>): void;
1578
+ addSoundfiles(soundfileMap: Record<string, AudioData$1>): void;
1579
1579
  getSoundfileList(): string[];
1580
1580
  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>;
1581
1581
  createAudioWorkletProcessor(name?: string, voiceFactory?: LooseFaustDspFactory, effectFactory?: LooseFaustDspFactory | null, processorName?: string): Promise<{
@@ -1589,4 +1589,8 @@ export declare class FaustPolyDspGenerator implements IFaustPolyDspGenerator {
1589
1589
  getUI(): FaustUIDescriptor;
1590
1590
  }
1591
1591
 
1592
+ export {
1593
+ AudioData$1 as AudioData,
1594
+ };
1595
+
1592
1596
  export {};