exportWav method

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

This method reads from sourcePath and writes document to outputPath as 16-bit PCM WAV.

The output is always WAV. An edit list must reproduce the source exactly where the list does not change the source. monowave does not encode the output to a lossy format, because a lossy encoder breaks that property and gives no warning.

Web has no filesystem to write to, so this method is not available there.

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;
  }
}