exportWav method

  1. @override
Future<void> exportWav({
  1. required String sourcePath,
  2. required String outputPath,
  3. required WaveformDocument document,
})
override

Writes document to outputPath as 16-bit PCM WAV, reading from sourcePath.

Output is always WAV. An edit list is meant to reproduce the source exactly where it did not change it, and re-encoding to a lossy format would quietly break that.

Not available on web, which has no filesystem to write to.

Implementation

@override
Future<void> exportWav({
  required String sourcePath,
  required String outputPath,
  required WaveformDocument document,
}) async {
  exports.add((sourcePath, outputPath, document));

  final error = nextExportError;
  if (error != null) {
    nextExportError = null;
    throw error;
  }
}