spessasynth_lib documentation
    Preparing search index...

    Interface LibWaveWriteOptions

    Options for writing a WAV file.

    interface LibWaveWriteOptions {
        channelCount: number;
        channelOffset: number;
        loop?: { end: number; start: number };
        metadata: Partial<WaveMetadata>;
        normalizeAudio: boolean;
    }

    Hierarchy

    • WaveWriteOptions
      • LibWaveWriteOptions
    Index
    channelCount: number

    This option limits the channel count to a given number. Otherwise, all channels starting from channelOffset are used.

    channelOffset: number

    The channel offset in the AudioBuffer. Defaults to 0. If the buffer has more than two channels, you can specify the channel offset to use. This is especially useful when extracting a stereo pair from a multichannel audio buffer.

    loop?: { end: number; start: number }

    The loop start and end points. Undefined if no loop should be written. The loop will be written to the file (using the cue chunk)

    Type Declaration

    • end: number

      The end point in seconds.

    • start: number

      The start point in seconds.

    metadata: Partial<WaveMetadata>

    The metadata to write into the file.

    The metadata uses the INFO chunk to write the information. It is encoded with utf-8

    normalizeAudio: boolean

    If true, the gain of the entire song will be adjusted, so the max sample is always 32,767 or min is always -32,768 (whichever is greater). Recommended.