@grame/faustwasm 0.1.1 → 0.1.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.
@@ -668,6 +668,7 @@ export interface IFaustPolyWebAudioNode extends IFaustPolyWebAudioDsp, AudioNode
668
668
  export type SoundfileItem = {
669
669
  name: string;
670
670
  url: string;
671
+ index: number;
671
672
  basePtr: number;
672
673
  };
673
674
  export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
@@ -719,10 +720,13 @@ export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
719
720
  static splitNames(input: string): string[];
720
721
  private extractURLsFromJSON;
721
722
  /**
722
- * Load a soundfile possibly containing several parts.
723
+ * Load a soundfile possibly containing several parts in the DSP struct.
724
+ * Soundfile pointers are located at 'index' offset, to be read in the JSON file.
725
+ * The DSP struct is located at baseDSP in the wasm memory,
726
+ * either a monophonic DSP, or a voice in a polyphonic context.
723
727
  *
724
728
  * @param sfReader : the soundfile reader
725
- * @param sfOffset : the offset in the wasm memory
729
+ * @param baseDSP : the base DSP in the wasm memory
726
730
  * @param name : the name of the soundfile
727
731
  * @param url : the url of the soundfile
728
732
  */
@@ -730,8 +734,9 @@ export declare class FaustBaseWebAudioDsp implements IFaustBaseWebAudioDsp {
730
734
  /**
731
735
  * Init soundfiles memory.
732
736
  *
733
- * Soundfile pointers are located at the beginning of the DSP struct memory (one after the other),
734
- * so that the TS scode can setup them easily.
737
+ * @param allocator : the wasm memory allocator
738
+ * @param sfReader : the soundfile reader
739
+ * @param baseDSP : the DSP struct (either a monophonic DSP of polyphonic voice) base DSP in the wasm memory
735
740
  */
736
741
  protected initSoundfileMemory(allocator: WasmAllocator, sfReader: SoundfileReader, baseDSP: number): Promise<void>;
737
742
  protected updateOutputs(): void;