From 69e1a42b1ba143cd2e3a096660f08ce991aa3185 Mon Sep 17 00:00:00 2001 From: libertyernie Date: Sat, 27 Apr 2019 13:58:36 -0500 Subject: [PATCH] Lossless MP3 MSF -> MP3 conversion --- LoopingAudioConverter/Exporters/MP3Exporter.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/LoopingAudioConverter/Exporters/MP3Exporter.cs b/LoopingAudioConverter/Exporters/MP3Exporter.cs index 6af550e..19b0114 100644 --- a/LoopingAudioConverter/Exporters/MP3Exporter.cs +++ b/LoopingAudioConverter/Exporters/MP3Exporter.cs @@ -19,6 +19,11 @@ public async Task WriteFileAsync(PCM16Audio lwav, string output_dir, string orig throw new AudioExporterException("Invalid character (\") found in output filename"); } + if (lwav.OriginalMP3 != null) { + File.WriteAllBytes(outPath, lwav.OriginalMP3); + return; + } + string infile = TempFiles.Create("wav"); File.WriteAllBytes(infile, lwav.Export());