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);} Copy
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);}
Readonly
An export whose estimated size is over the configured limit.
Example