zx_tape_to_wav 2.0.5 zx_tape_to_wav: ^2.0.5 copied to clipboard
Easy Flutter library to convert .TAP/.TZX files (a data format for ZX-Spectrum emulator) into sound WAV file.
import 'dart:io';
import 'package:zx_tape_to_wav/zx_tape_to_wav.dart';
void main() async {
var sourceFilePath = 'assets/roms/RENEGADE.tzx';
var outputFileName = 'assets/out/RENEGADE.wav';
await new File(sourceFilePath)
.readAsBytes()
.then((input) => ZxTape.create(input)
.then((tape) => tape.toWavBytes(
frequency: 11025,
amplifySignal: true,
progress: (percents) {
print(percents);
}))
.then((output) => new File(outputFileName).writeAsBytes(output)));
}