diff --git a/DiscoHawk/AudioExtractor.cs b/DiscoHawk/AudioExtractor.cs index a830618710..285e43cab5 100644 --- a/DiscoHawk/AudioExtractor.cs +++ b/DiscoHawk/AudioExtractor.cs @@ -30,7 +30,9 @@ namespace BizHawk try { File.WriteAllBytes(tempfile, waveData); - Encode(tempfile, string.Format("{0} - Track {1:D2}.mp3", Path.Combine(path, filebase), track.num)); + string mp3Path = string.Format("{0} - Track {1:D2}.mp3", Path.Combine(path, filebase), track.num); + var ffmpeg = new FFMpeg(); + ffmpeg.Run("-f", "s16le", "-ar", "44100", "-ac", "2", "-i", tempfile, "-f", "mp3", "-ab", "192k", mp3Path); } finally { @@ -38,16 +40,5 @@ namespace BizHawk } } } - - static void Encode(string wavePath, string mp3Path) - { - var ffmpeg = new FFMpeg(); - ffmpeg.Run("-f", "s16le", "-ar", "44100", "-ac", "2", "-i", wavePath, "-f", "mp3", "-ab", "192k", mp3Path); - } - - static string[] Escape(params string[] args) - { - return args.Select(s => s.Contains(" ") ? string.Format("\"{0}\"", s) : s).ToArray(); - } } }