mwg API
    Preparing search index...

    Class ExportTooLargeError

    An export whose estimated size is over the configured limit.

    import { AudioExport, ExportTooLargeError } from '@datamoc/mwg/audio';

    declare const frames: { sampleRate: number; left: Float32Array; right: Float32Array };

    try {
    await new AudioExport({ maxBytes: 1_000_000 }).export(frames, { format: 'wav' });
    } catch (error) {
    if (error instanceof ExportTooLargeError) console.log(error.estimatedBytes, error.maxBytes);
    }

    Hierarchy

    • Error
      • ExportTooLargeError
    Index
    estimatedBytes: number
    maxBytes: number