예제 #1
0
        static void Main(string[] args)
        {
            if (args.Length != 1)
            {
                Console.WriteLine("Drag n' drop a WEM or any audio file onto this EXE to convert it. WEM will be converted to WAV no matter what.");
                Console.WriteLine("Press any key to quit...");
                Console.ReadKey(true);
                return;
            }

            FileInfo file = new FileInfo(args[0]);

            if (file.Extension.ToLower() == ".wem")
            {
                Console.WriteLine("WARNING: WEM conversion is a bit busted right now! If your file is broken, sorry! A patch will be out ASAP.");
                WEMFile wem = new WEMFile(file.FullName);
                WAVFile wav = wem.ConvertToWAV();
                wav.SaveToFile(file.FullName + ".wav");
            }
            else
            {
                file = FFmpegWrapper.ConvertToWaveFile(file.FullName);
                WAVFile wav = new WAVFile(file.FullName);
                WEMFile wem = wav.ConvertToWEM();
                wem.SaveToFile(args[0] + ".wem");
            }
        }