示例#1
0
        void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get params
            sFile file = (sFile)e.Argument;

            // Get out file
            string wav_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + file.name + ".wav";

            if (System.IO.File.Exists(wav_file))
            {
                try { File.Delete(wav_file); }
                catch { wav_file += '_' + Path.GetRandomFileName(); }
            }

            // Process
            if (file.name.ToUpper().EndsWith(".SAD"))
            {
                SADL sadl = new SADL(pluginHost.Get_Language(), file.path, file.id);
                sadl.Initialize();
                sadl.Save_WAV(wav_file, false);
            }
            else if (file.name.ToUpper().EndsWith(".ADX"))
            {
                ADX adx = new ADX(file.name, file.id);
                adx.Initialize();
                adx.Save_WAV(wav_file, false);
            }
        }
示例#2
0
文件: Main.cs 项目: MetLob/tinke
        void bw_DoWork(object sender, DoWorkEventArgs e)
        {
            // Get params
            sFile file = (sFile)e.Argument;

            // Get out file
            string wav_file = pluginHost.Get_TempFolder() + Path.DirectorySeparatorChar + file.name + ".wav";
            if (System.IO.File.Exists(wav_file))
            {
                try { File.Delete(wav_file); }
                catch { wav_file += '_' + Path.GetRandomFileName(); }
            }

            // Process
            if (file.name.ToUpper().EndsWith(".SAD"))
            {
                SADL sadl = new SADL(pluginHost.Get_Language(), file.path, file.id);
                sadl.Initialize();
                sadl.Save_WAV(wav_file, false);
            }
            else if (file.name.ToUpper().EndsWith(".ADX"))
            {
                ADX adx = new ADX(file.name, file.id);
                adx.Initialize();
                adx.Save_WAV(wav_file, false);
            }
        }