mwg API
    Preparing search index...

    Function assertInputSize

    • Throws when input is bigger than maxInputBytes, before a decoder has touched it.

      Parameters

      • input: { byteLength: number }
      • limits: Partial<DecoderLimits> = {}
      • label: string = 'input'

      Returns void

      import { assertInputSize } from '@datamoc/mwg/audio';

      declare const bytes: Uint8Array;

      assertInputSize(bytes, { maxInputBytes: 1_000_000 }, 'tune.nsf');