OSDN Git Service

#28821 DTXC:DTXManiaをViewerにしたときに、DTXC側から、GRモード, TimeStretch, VSyncWaitの設定ができるようにした。
[dtxmania/dtxmania.git] / DTXCreatorプロジェクト / コード / 03.オプション関連 / Cオプション管理.cs
index 105c213..2387325 100644 (file)
@@ -32,12 +32,20 @@ namespace DTXCreator.オプション関連
                        cオプションダイアログ.radioButton_UseDTXManiaGR.Checked = !this.formメインフォーム.appアプリ設定.ViewerInfo.bViewerIsDTXV;\r
 \r
                        cオプションダイアログ.groupBox_SoundDeviceSettings.Enabled = !this.formメインフォーム.appアプリ設定.ViewerInfo.bViewerIsDTXV;\r
-                       cオプションダイアログ.radioButton_DirectSound.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == AppSetting.ViewerSoundType.DirectSound;\r
-                       cオプションダイアログ.radioButton_WASAPI.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == AppSetting.ViewerSoundType.WASAPI;\r
-                       cオプションダイアログ.radioButton_ASIO.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == AppSetting.ViewerSoundType.ASIO;\r
+                       cオプションダイアログ.radioButton_DirectSound.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == FDK.ESoundDeviceType.DirectSound;\r
+                       cオプションダイアログ.radioButton_WASAPI.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == FDK.ESoundDeviceType.ExclusiveWASAPI;\r
+                       cオプションダイアログ.radioButton_ASIO.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType == FDK.ESoundDeviceType.ASIO;\r
 \r
-                       cオプションダイアログ.tASIOデバイスリストの内訳を生成する();\r
+                       int nASIOdevs = cオプションダイアログ.tASIOデバイスリストの内訳を生成する();\r
                        cオプションダイアログ.comboBox_ASIOdevices.SelectedIndex = this.formメインフォーム.appアプリ設定.ViewerInfo.ASIODeviceNo;\r
+                       if ( nASIOdevs == 1 && cオプションダイアログ.comboBox_ASIOdevices.Items[ 0 ].ToString() == "None" )\r
+                       {\r
+                               cオプションダイアログ.radioButton_ASIO.Enabled = false;\r
+                       }\r
+\r
+                       cオプションダイアログ.checkBox_GRmode.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.GRmode;\r
+                       cオプションダイアログ.checkBox_TimeStretch.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.TimeStretch;\r
+                       cオプションダイアログ.checkBox_VSyncWait.Checked = this.formメインフォーム.appアプリ設定.ViewerInfo.VSyncWait;\r
                        #endregion\r
 \r
 \r
@@ -61,22 +69,31 @@ namespace DTXCreator.オプション関連
                                #region [ Viewer設定 ]\r
                                this.formメインフォーム.appアプリ設定.ViewerInfo.bViewerIsDTXV = cオプションダイアログ.radioButton_UseDTXViewer.Checked;\r
 \r
-                               AppSetting.ViewerSoundType vst = (FDK.COS.bIsVistaOrLater)? AppSetting.ViewerSoundType.WASAPI : AppSetting.ViewerSoundType.DirectSound;\r
+                               //AppSetting.ViewerSoundType vst = ( FDK.COS.bIsVistaOrLater ) ? AppSetting.ViewerSoundType.WASAPI : AppSetting.ViewerSoundType.DirectSound;\r
+                               FDK.ESoundDeviceType vst = ( FDK.COS.bIsVistaOrLater ) ? FDK.ESoundDeviceType.ExclusiveWASAPI :  FDK.ESoundDeviceType.DirectSound;\r
                                if ( cオプションダイアログ.radioButton_DirectSound.Checked )\r
                                {\r
-                                       vst = AppSetting.ViewerSoundType.DirectSound;\r
+                                       //vst = AppSetting.ViewerSoundType.DirectSound;\r
+                                       vst = FDK.ESoundDeviceType.DirectSound;\r
                                }\r
                                else if ( cオプションダイアログ.radioButton_WASAPI.Checked )\r
                                {\r
-                                       vst = AppSetting.ViewerSoundType.WASAPI;\r
+                                       //vst = AppSetting.ViewerSoundType.WASAPI;\r
+                                       vst = FDK.ESoundDeviceType.ExclusiveWASAPI;\r
                                }\r
                                else if ( cオプションダイアログ.radioButton_ASIO.Checked )\r
                                {\r
-                                       vst = AppSetting.ViewerSoundType.ASIO;\r
+                                       //vst = AppSetting.ViewerSoundType.ASIO;\r
+                                       vst = FDK.ESoundDeviceType.ASIO;\r
                                }\r
                                this.formメインフォーム.appアプリ設定.ViewerInfo.SoundType = vst;\r
 \r
                                this.formメインフォーム.appアプリ設定.ViewerInfo.ASIODeviceNo = cオプションダイアログ.comboBox_ASIOdevices.SelectedIndex;\r
+\r
+                               this.formメインフォーム.appアプリ設定.ViewerInfo.GRmode = cオプションダイアログ.checkBox_GRmode.Checked;\r
+                               this.formメインフォーム.appアプリ設定.ViewerInfo.TimeStretch = cオプションダイアログ.checkBox_TimeStretch.Checked;\r
+                               this.formメインフォーム.appアプリ設定.ViewerInfo.VSyncWait = cオプションダイアログ.checkBox_VSyncWait.Checked;\r
+\r
                                this.formメインフォーム.tDTXV演奏関連のボタンとメニューのEnabledの設定();\r
 \r
                                #endregion\r