mwg API
    Preparing search index...

    Type Alias SoundFontSampleEncoder

    SoundFontSampleEncoder: (
        frames: Int16Array,
        rate: number,
        codec: SampleCodec,
        options?: SampleEncodeOptions,
    ) => Uint8Array | Promise<Uint8Array>

    Turns mono 16-bit frames into the compressed bytes of one SoundFont 3 sample in codec. The frames are at rate, the rate the sample header will state; an encoder whose codec runs at fixed rates (Opus resamples to 48 kHz) decodes back at rate all the same.

    Type Declaration