//DVPLを化(Pythonのプログラムに引数を渡し実行)
        private async void DVPL_Create_B_Click(object sender, RoutedEventArgs e)
        {
            if (IsBusy)
            {
                return;
            }
            OpenFileDialog ofd = new OpenFileDialog()
            {
                Title       = "dvpl化するファイルを選択してください。",
                Multiselect = true,
                Filter      = "ファイル(*.*)|*.*"
            };

            if (ofd.ShowDialog() == DialogResult.OK)
            {
                string Error_Path = "";
                Message_T.Text = "DVPL化しています...";
                await Task.Delay(50);

                foreach (string File_Path in ofd.FileNames)
                {
                    if (Path.GetExtension(File_Path) == ".dvpl")
                    {
                        Error_Path += File_Path + "\n";
                        continue;
                    }
                    try
                    {
                        DVPL.DVPL_Pack(File_Path, File_Path + ".dvpl", false);
                        if (!File.Exists(File_Path + ".dvpl"))
                        {
                            throw new Exception(".dvplファイルが作成できていません。");
                        }
                    }
                    catch (Exception e1)
                    {
                        Error_Path += File_Path + "\n";
                        Sub_Code.Error_Log_Write(e1.Message);
                    }
                }
                Message_Feed_Out("ファイルをDVPL化しました。");
                if (Error_Path != "")
                {
                    Message_T.Text += "(エラーあり)";
                    System.Windows.MessageBox.Show("以下のファイルはdvpl化できませんでした。\n" + Error_Path);
                }
            }
        }
Пример #2
0
        private async void Start_B_Click(object sender, RoutedEventArgs e)
        {
            if (IsClosing || IsBusy || IsOpenDialog)
            {
                return;
            }
            if (BNK_Voices.Count == 0)
            {
                Message_Feed_Out("音声ファイルが選択されていません。");
                return;
            }
            foreach (string BGM_File in BGM_Add)
            {
                if (!File.Exists(BGM_File))
                {
                    Message_Feed_Out(Path.GetFileName(BGM_File) + "が存在しませんでした。");
                    return;
                }
            }
            IsOpenDialog = true;
            BetterFolderBrowser fbd = new BetterFolderBrowser()
            {
                Title       = "保存先を選択してください。",
                Multiselect = false,
                RootFolder  = Sub_Code.Get_OpenDirectory_Path()
            };

            if (fbd.ShowDialog() == DialogResult.OK)
            {
                IsBusy = true;
                string SetPath = fbd.SelectedFolder;
                Sub_Code.Set_Directory_Path(SetPath);
                if (!Sub_Code.CanDirectoryAccess(SetPath))
                {
                    Message_Feed_Out("指定したフォルダにアクセスできませんでした。");
                    IsBusy       = false;
                    IsOpenDialog = false;
                    return;
                }
                try
                {
                    Message_T.Opacity = 1;
                    IsMessageShowing  = false;
                    List <string> Add_BGM_List = new List <string>();
                    if (BGM_Add_List.Items.Count > 0)
                    {
                        Message_T.Text = "BGMファイルを適応させています...";
                        await Task.Delay(50);

                        for (int Number = 0; Number < BGM_Add.Count; Number++)
                        {
                            if (Number < 10)
                            {
                                File.Copy(BGM_Add[Number], Voice_Set.Special_Path + "/Wwise/BNK_WAV/battle_bgm_0" + Number + Path.GetExtension(BGM_Add[Number]), true);
                                Add_BGM_List.Add(Voice_Set.Special_Path + "/Wwise/BNK_WAV/battle_bgm_0" + Number + ".wav");
                            }
                            else
                            {
                                File.Copy(BGM_Add[Number], Voice_Set.Special_Path + "/Wwise/BNK_WAV/battle_bgm_" + Number + Path.GetExtension(BGM_Add[Number]), true);
                                Add_BGM_List.Add(Voice_Set.Special_Path + "/Wwise/BNK_WAV/battle_bgm_" + Number + ".wav");
                            }
                        }
                    }
                    if (Volume_Set_C.IsChecked.Value)
                    {
                        Message_T.Text = ".wavに変換しています...";
                        await Task.Delay(50);

                        await Multithread.Convert_To_Wav(Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/BNK_WAV", "*", SearchOption.TopDirectoryOnly), Voice_Set.Special_Path + "/Wwise/BNK_WAV", true, true);

                        Message_T.Text = "音量をWoTB用に調整しています...";
                        await Task.Delay(50);

                        Sub_Code.Volume_Set(Voice_Set.Special_Path + "/Wwise/BNK_WAV", Encode_Mode.WAV);
                    }
                    else
                    {
                        Message_T.Text = ".wavに変換しています...";
                        await Task.Delay(50);

                        await Multithread.Convert_To_Wav(Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/BNK_WAV", "*", SearchOption.TopDirectoryOnly), Voice_Set.Special_Path + "/Wwise/BNK_WAV", true, true);
                    }
                    Message_T.Text = "ファイルをコピーしています...";
                    if (Directory.Exists(Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices"))
                    {
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices", true);
                    }
                    await Task.Delay(50);

                    string Log_01 = Sub_Code.Set_Voice_Type_Change_Name_By_Index(Voice_Set.Special_Path + "/Wwise/BNK_WAV", Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices", BNK_Voices, BNK_Voices_Enable);
                    if (Log_01 != "")
                    {
                        Message_Feed_Out("ファイルをコピーできませんでした。詳しくは\"Error_Log.txt\"を参照してください。");
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices", true);
                        IsBusy       = false;
                        IsOpenDialog = false;
                        return;
                    }
                    foreach (string BGM_Now in Add_BGM_List)
                    {
                        Sub_Code.File_Move(BGM_Now, Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices/" + Path.GetFileName(BGM_Now), true);
                    }
                    Message_T.Text = "SEの有無をチェックし、適応しています...";
                    await Task.Delay(50);
                    await BNK_Create_V2(Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices", SetPath);

                    if (DVPL_C.IsChecked.Value)
                    {
                        Message_T.Text = "DVPL化しています...";
                        await Task.Delay(50);

                        DVPL.DVPL_Pack(SetPath + "/voiceover_crew.bnk", SetPath + "/voiceover_crew.bnk.dvpl", true);
                        DVPL.DVPL_Pack(SetPath + "/ui_battle.bnk", SetPath + "/ui_battle.bnk.dvpl", true);
                        DVPL.DVPL_Pack(SetPath + "/ui_battle_basic.bnk", SetPath + "/ui_battle_basic.bnk.dvpl", true);
                        DVPL.DVPL_Pack(SetPath + "/ui_chat_quick_commands.bnk", SetPath + "/ui_chat_quick_commands.bnk.dvpl", true);
                        DVPL.DVPL_Pack(SetPath + "/reload.bnk", SetPath + "/reload.bnk.dvpl", true);
                    }
                    Directory.Delete(Voice_Set.Special_Path + "/Wwise/BNK_WAV/Voices", true);
                    bool IsOK = true;
                    if (Install_C.IsChecked.Value)
                    {
                        Message_T.Text = "WoTBに適応しています...";
                        await Task.Delay(50);

                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ja/voiceover_crew.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/reload.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_chat_quick_commands.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle_basic.bnk");
                        if (!Sub_Code.DVPL_File_Copy(SetPath + "/voiceover_crew.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ja/voiceover_crew.bnk", true))
                        {
                            IsOK = false;
                        }
                        Sub_Code.DVPL_File_Copy(SetPath + "/reload.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/reload.bnk", true);
                        Sub_Code.DVPL_File_Copy(SetPath + "/ui_chat_quick_commands.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_chat_quick_commands.bnk", true);
                        Sub_Code.DVPL_File_Copy(SetPath + "/ui_battle.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle.bnk", true);
                        Sub_Code.DVPL_File_Copy(SetPath + "/ui_battle_basic.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle_basic.bnk", true);
                    }
                    Flash.Flash_Start();
                    if (IsOK)
                    {
                        Message_Feed_Out("完了しました。");
                    }
                    else
                    {
                        Message_Feed_Out("エラー:WoTBに適応できませんでした。");
                    }
                }
                catch (Exception e1)
                {
                    Sub_Code.Error_Log_Write(e1.Message);
                }
                IsBusy = false;
            }
            fbd.Dispose();
            IsOpenDialog = false;
        }
Пример #3
0
        //変換
        //fsbからwavファイルを抽出し、ファイル名を変更、adpcmの場合ファイルが破損しているため復元してから.bnkを作成
        private async void Chnage_To_Wwise_B_Click(object sender, RoutedEventArgs e)
        {
            if (IsClosing || Opacity < 1)
            {
                return;
            }
            if (Voice_FSB_File == "")
            {
                Message_Feed_Out("FSB file is not selected.");
                return;
            }
            try
            {
                IsClosing = true;
                BetterFolderBrowser sfd = new BetterFolderBrowser()
                {
                    Title       = "Please specify the save destination folder.",
                    RootFolder  = Sub_Code.Get_OpenDirectory_Path(),
                    Multiselect = false
                };
                if (sfd.ShowDialog() == System.Windows.Forms.DialogResult.OK)
                {
                    FModChannel.setPaused(true);
                    await Task.Delay(50);

                    Sub_Code.Set_Directory_Path(sfd.SelectedFolder);
                    FSB_Details_L.Items[2] = "Output:" + sfd.SelectedFolder.Substring(sfd.SelectedFolder.LastIndexOf("\\") + 1);
                    if (Directory.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP"))
                    {
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", true);
                    }
                    if (Directory.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices"))
                    {
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true);
                    }
                    Message_T.Text = "Extracting audio from FSB file...";
                    await Task.Delay(50);

                    Fmod_File_Extract_V2.FSB_Extract_To_Directory(Voice_FSB_File, Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP");
                    Message_T.Text = "Encoding *.wav files...";
                    await Task.Delay(50);

                    await Multithread.Convert_To_Wav(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true);

                    Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", true);
                    Message_T.Text = "Renaming *.wav files...";
                    await Task.Delay(50);

                    Voice_Set.Voice_BGM_Name_Change_From_FSB(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices");
                    string[] Reload_Files = Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", "reload_*", SearchOption.TopDirectoryOnly);
                    foreach (string Reload_Now in Reload_Files)
                    {
                        FileInfo fi_reload = new FileInfo(Reload_Now);
                        if (fi_reload.Length == 290340 || fi_reload.Length == 335796 || fi_reload.Length == 336036 || fi_reload.Length == 445836 || fi_reload.Length == 497268 || fi_reload.Length == 541980)
                        {
                            fi_reload.Delete();
                        }
                    }
                    string[] Voice_Files = Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", "*.wav", SearchOption.TopDirectoryOnly);
                    //音声の場合はたいていファイル名の語尾に_01や_02と書いているため、書かれていないファイルは削除する
                    foreach (string Voice_Now in Voice_Files)
                    {
                        if (!Path.GetFileNameWithoutExtension(Voice_Now).Contains("_") || !Sub_Code.IsIncludeInt_From_String(Path.GetFileNameWithoutExtension(Voice_Now), "_"))
                        {
                            File.Delete(Voice_Now);
                        }
                    }
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/lock_on.wav"))
                    {
                        File.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/lock_on.wav");
                    }
                    Message_T.Text = "Creating a BNK file...";
                    await Task.Delay(50);

                    FileInfo fi = new FileInfo(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu");
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp") && fi.Length >= 800000)
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", true);
                    }
                    if (!File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp"))
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", true);
                    }
                    WoTB_Voice_Mod_Creater.Wwise_Class.Wwise_Project_Create Wwise = new WoTB_Voice_Mod_Creater.Wwise_Class.Wwise_Project_Create(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod");
                    Wwise.Sound_Add_Wwise(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices");
                    Wwise.Save();
                    Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true);
                    Wwise.Project_Build("voiceover_crew", sfd.SelectedFolder + "/voiceover_crew.bnk");

                    /*await Task.Delay(500);
                     * Wwise.Project_Build("ui_battle", sfd.SelectedFolder + "/ui_battle.bnk");
                     * await Task.Delay(500);
                     * Wwise.Project_Build("ui_chat_quick_commands", sfd.SelectedFolder + "/ui_chat_quick_commands.bnk");
                     * await Task.Delay(500);
                     * Wwise.Project_Build("reload", sfd.SelectedFolder + "/reload.bnk");*/
                    Wwise.Clear();
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp"))
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", true);
                    }
                    if (DVPL_C.IsChecked.Value)
                    {
                        Message_T.Text = "Encoding to DVPL format...";
                        await Task.Delay(50);

                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/voiceover_crew.bnk", sfd.SelectedFolder + "/voiceover_crew.bnk.dvpl", true);

                        /*DVPL.DVPL_Pack(sfd.SelectedFolder + "/ui_battle.bnk", sfd.SelectedFolder + "/ui_battle.bnk.dvpl", true);
                         * DVPL.DVPL_Pack(sfd.SelectedFolder + "/ui_chat_quick_commands.bnk", sfd.SelectedFolder + "/ui_chat_quick_commands.bnk.dvpl", true);
                         * DVPL.DVPL_Pack(sfd.SelectedFolder + "/reload.bnk", sfd.SelectedFolder + "/reload.bnk.dvpl", true);*/
                    }
                    Message_Feed_Out("The operation is complete. If the bnk file is extremely small in size, it may have failed.");
                }
            }
            catch (Exception e1)
            {
                Sub_Code.Error_Log_Write(e1.Message);
                Message_Feed_Out("An error has occurred. See Log.txt for details.");
            }
            IsClosing = false;
            Position_Change();
        }
        //変換
        //fsbからwavファイルを抽出し、ファイル名を変更、adpcmの場合ファイルが破損しているため復元してから.bnkを作成
        private async void Chnage_To_Wwise_B_Click(object sender, RoutedEventArgs e)
        {
            if (IsClosing || Opacity < 1 || IsOpenDialog)
            {
                return;
            }
            if (Voice_FSB_File == "")
            {
                Message_Feed_Out("FSBファイルが選択されていません。");
                return;
            }
            try
            {
                IsClosing    = true;
                IsOpenDialog = true;
                BetterFolderBrowser sfd = new BetterFolderBrowser()
                {
                    Title       = "保存先のフォルダを指定してください。",
                    RootFolder  = Sub_Code.Get_OpenDirectory_Path(),
                    Multiselect = false
                };
                if (sfd.ShowDialog() == DialogResult.OK)
                {
                    Sub_Code.Set_Directory_Path(sfd.SelectedFolder);
                    FSB_Details_L.Items[4] = "出力先のフォルダ名:" + sfd.SelectedFolder.Substring(sfd.SelectedFolder.LastIndexOf("\\") + 1);
                    if (Directory.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP"))
                    {
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", true);
                    }
                    if (Directory.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices"))
                    {
                        Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true);
                    }
                    Message_T.Text = "FSBファイルから音声を抽出しています...";
                    await Task.Delay(50);

                    Fmod_File_Extract_V2.FSB_Extract_To_Directory(Voice_FSB_File, Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP");
                    if (BGM_FSB_File != "")
                    {
                        Message_T.Text = "FSBファイルからBGMを抽出しています...";
                        await Task.Delay(50);

                        Fmod_File_Extract_V2.FSB_Extract_To_Directory(BGM_FSB_File, Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP");
                    }
                    Message_T.Text = ".wavファイルをエンコードしています...";
                    await Task.Delay(50);

                    await Multithread.Convert_To_Wav(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true, true, false, false);

                    Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices_TMP", true);
                    if (BGM_Add_Only.Count > 0)
                    {
                        Message_T.Text = "追加されたBGMファイルをwavに変換しています...";
                        await Task.Delay(50);

                        foreach (string File_Now in BGM_Add_Only)
                        {
                            if (!Sub_Code.Audio_IsWAV(File_Now))
                            {
                                Sub_Code.Audio_Encode_To_Other(File_Now, Sub_Code.File_Rename_Get_Name(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/battle_bgm") + ".wav", ".wav", false);
                            }
                            else
                            {
                                File.Copy(File_Now, Sub_Code.File_Rename_Get_Name(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/battle_bgm") + ".wav", true);
                            }
                        }
                    }
                    Message_T.Text = "音声のファイル名を変更しています...";
                    await Task.Delay(50);

                    Voice_Set.Voice_BGM_Name_Change_From_FSB(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices");
                    string[] Reload_Files = Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", "reload_*", SearchOption.TopDirectoryOnly);
                    foreach (string Reload_Now in Reload_Files)
                    {
                        FileInfo fi_reload = new FileInfo(Reload_Now);
                        if (fi_reload.Length == 290340 || fi_reload.Length == 335796 || fi_reload.Length == 336036 || fi_reload.Length == 445836 || fi_reload.Length == 497268 || fi_reload.Length == 541980)
                        {
                            fi_reload.Delete();
                        }
                    }
                    string[] Voice_Files = Directory.GetFiles(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", "*.wav", SearchOption.TopDirectoryOnly);
                    //音声の場合はたいていファイル名の語尾に_01や_02と書いているため、書かれていないファイルは削除する
                    foreach (string Voice_Now in Voice_Files)
                    {
                        if (!Path.GetFileNameWithoutExtension(Voice_Now).Contains("_") || !Sub_Code.IsIncludeInt_From_String(Path.GetFileNameWithoutExtension(Voice_Now), "_"))
                        {
                            File.Delete(Voice_Now);
                        }
                    }
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/lock_on.wav"))
                    {
                        File.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices/lock_on.wav");
                    }
                    if (BGM_Add_List.Items.Count > 0)
                    {
                        Message_T.Text = ".bnkファイルを作成しています...\nBGMが含まれているため時間がかかります...";
                    }
                    else
                    {
                        Message_T.Text = ".bnkファイルを作成しています...";
                    }
                    await Task.Delay(50);

                    FileInfo fi = new FileInfo(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu");
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp") && fi.Length >= 800000)
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", true);
                    }
                    if (!File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp"))
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", true);
                    }
                    Wwise_Class.Wwise_Project_Create Wwise = new Wwise_Class.Wwise_Project_Create(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod");
                    Wwise.Sound_Add_Wwise(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices");
                    Wwise.Save();
                    Directory.Delete(Voice_Set.Special_Path + "/Wwise/FSB_Extract_Voices", true);
                    Wwise.Project_Build("voiceover_crew", sfd.SelectedFolder + "/voiceover_crew.bnk");
                    await Task.Delay(500);

                    Wwise.Project_Build("ui_battle", sfd.SelectedFolder + "/ui_battle.bnk");
                    await Task.Delay(500);

                    Wwise.Project_Build("ui_battle_basic", sfd.SelectedFolder + "/ui_battle_basic.bnk");
                    await Task.Delay(500);

                    Wwise.Project_Build("ui_chat_quick_commands", sfd.SelectedFolder + "/ui_chat_quick_commands.bnk");
                    await Task.Delay(500);

                    Wwise.Project_Build("reload", sfd.SelectedFolder + "/reload.bnk");
                    Wwise.Clear();
                    if (File.Exists(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp"))
                    {
                        File.Copy(Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Backup.tmp", Voice_Set.Special_Path + "/Wwise/WoTB_Sound_Mod/Actor-Mixer Hierarchy/Default Work Unit.wwu", true);
                    }
                    if (DVPL_C.IsChecked.Value)
                    {
                        Message_T.Text = "DVPL化しています...";
                        await Task.Delay(50);

                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/voiceover_crew.bnk", sfd.SelectedFolder + "/voiceover_crew.bnk.dvpl", true);
                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/ui_battle.bnk", sfd.SelectedFolder + "/ui_battle.bnk.dvpl", true);
                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/ui_battle_basic.bnk", sfd.SelectedFolder + "/ui_battle_basic.bnk.dvpl", true);
                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/ui_chat_quick_commands.bnk", sfd.SelectedFolder + "/ui_chat_quick_commands.bnk.dvpl", true);
                        DVPL.DVPL_Pack(sfd.SelectedFolder + "/reload.bnk", sfd.SelectedFolder + "/reload.bnk.dvpl", true);
                    }
                    if (Install_C.IsChecked.Value)
                    {
                        Message_T.Text = "WoTBに適応しています...";
                        await Task.Delay(50);

                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ja/voiceover_crew.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_chat_quick_commands.bnk");
                        Sub_Code.DVPL_File_Delete(Voice_Set.WoTB_Path + "/Data/WwiseSound/reload.bnk");
                        Sub_Code.DVPL_File_Copy(sfd.SelectedFolder + "/voiceover_crew.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ja/voiceover_crew.bnk", true);
                        Sub_Code.DVPL_File_Copy(sfd.SelectedFolder + "/ui_battle.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_battle.bnk", true);
                        Sub_Code.DVPL_File_Copy(sfd.SelectedFolder + "/ui_chat_quick_commands.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/ui_chat_quick_commands.bnk", true);
                        Sub_Code.DVPL_File_Copy(sfd.SelectedFolder + "/reload.bnk", Voice_Set.WoTB_Path + "/Data/WwiseSound/reload.bnk", true);
                    }
                    Flash.Flash_Start();
                    Message_Feed_Out("完了しました。\nファイル容量が極端に少ない場合は失敗している可能性があります。");
                }
            }
            catch (Exception e1)
            {
                Sub_Code.Error_Log_Write(e1.Message);
                Message_Feed_Out("エラーが発生しました。詳しくはLog.txtを参照してください。");
            }
            IsClosing    = false;
            IsOpenDialog = false;
        }