OSDN Git Service

#28263 DTX2WAV005:
authoryyagi <yyagi.dtxmania@gmail.com>
Sun, 11 Feb 2018 16:59:45 +0000 (01:59 +0900)
committeryyagi <yyagi.dtxmania@gmail.com>
Sun, 11 Feb 2018 16:59:45 +0000 (01:59 +0900)
 * wav/ogg/mp3の選択機能追加
 * 出力オーディオ形式のdropdownstyleを、dropdownlistに変更。(readonlyにするため)
 * モニター出力on/off機能を一旦無効化。(ON固定)
 * マスターボリューム最大値を100から200に変更 これに伴い本体側マスターボリュームも200まで使用可能に(WASAPI/ASIO限定)
 * ogg/mp3の出力に対応。ただし前者はQuality=8(256kbps), 後者は128kbps設定で固定。
 * 録音中のウインドウのサイズ変更を無効化
 * 曲読み込み後、本体側での画面フェードアウト処理を削除(録音開始までの待ち時間を1秒短縮)

15 files changed:
DTX2WAV/App.config
DTX2WAV/Form1.Designer.cs
DTX2WAV/Form1.cs
DTX2WAV/Form1.resx
DTX2WAV/Form_Recording.Designer.cs
DTX2WAV/Properties/AssemblyInfo.cs
DTX2WAV/Properties/Settings.Designer.cs
DTX2WAV/Properties/Settings.settings
DTXMania/コード/ステージ/04.コンフィグ/CConfigXml.cs
DTXMania/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs
DTXMania/コード/全体/CDTXMania.cs
FDK/コード/03.サウンド/CSound.cs
FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs
RuntimeResources/dll/lame.exe [new file with mode: 0644]
RuntimeResources/dll/oggenc2.exe [new file with mode: 0644]

index 13e2572..266c2b1 100644 (file)
@@ -37,6 +37,9 @@
             <setting name="IsUpgrade" serializeAs="String">
                 <value>False</value>
             </setting>
+            <setting name="nAudioFormat" serializeAs="String">
+                <value>0</value>
+            </setting>
         </DTX2WAV.Properties.Settings>
     </userSettings>
 </configuration>
\ No newline at end of file
index 5dc5ce1..c5b45a8 100644 (file)
                        // 
                        // comboBox_AudioFormat
                        // 
+                       this.comboBox_AudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
                        this.comboBox_AudioFormat.FormattingEnabled = true;
                        this.comboBox_AudioFormat.Items.AddRange(new object[] {
             resources.GetString("comboBox_AudioFormat.Items"),
                        // 
                        this.numericUpDown_Master.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Master, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
                        resources.ApplyResources(this.numericUpDown_Master, "numericUpDown_Master");
+                       this.numericUpDown_Master.Maximum = new decimal(new int[] {
+            200,
+            0,
+            0,
+            0});
                        this.numericUpDown_Master.Name = "numericUpDown_Master";
                        this.numericUpDown_Master.Value = new decimal(new int[] {
             100,
                        resources.ApplyResources(this.trackBar_Master, "trackBar_Master");
                        this.trackBar_Master.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Master, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
                        this.trackBar_Master.LargeChange = 10;
-                       this.trackBar_Master.Maximum = 100;
+                       this.trackBar_Master.Maximum = 200;
                        this.trackBar_Master.Name = "trackBar_Master";
                        this.trackBar_Master.TickFrequency = 10;
                        this.trackBar_Master.Value = 100;
index 4cbfcb9..d245f8f 100644 (file)
@@ -73,6 +73,7 @@ namespace DTX2WAV
                        numericUpDown_Bass.Value   = Properties.Settings.Default.nVol_Bass;
                        numericUpDown_Master.Value = Properties.Settings.Default.nVol_Master;
                        checkBox_MonitorSound.Checked = Properties.Settings.Default.bMonitorSound;
+                       comboBox_AudioFormat.SelectedIndex = Properties.Settings.Default.nAudioFormat;
                        #endregion
                }
 
@@ -231,7 +232,7 @@ namespace DTX2WAV
                                                }
                                                break;
 
-                                       default:
+                                       default:                // DTXMania本体を強制終了した、など
                                                break;
 
                                }
@@ -327,6 +328,7 @@ namespace DTX2WAV
                        Properties.Settings.Default.nVol_Bass     = (int)numericUpDown_Bass.Value;
                        Properties.Settings.Default.nVol_Master   = (int)numericUpDown_Master.Value;
                        Properties.Settings.Default.bMonitorSound = checkBox_MonitorSound.Checked;
+                       Properties.Settings.Default.nAudioFormat = comboBox_AudioFormat.SelectedIndex;
                        #endregion
 
                        Properties.Settings.Default.Save();
index b45030f..606a821 100644 (file)
     <value>17, 17</value>
   </metadata>
   <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
-  <data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>93, 22</value>
-  </data>
-  <data name="exitToolStripMenuItem.Text" xml:space="preserve">
-    <value>E&amp;xit</value>
-  </data>
-  <data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>37, 20</value>
-  </data>
-  <data name="toolStripMenuItem1.Text" xml:space="preserve">
-    <value>&amp;File</value>
-  </data>
-  <data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>39, 20</value>
-  </data>
-  <data name="editToolStripMenuItem.Text" xml:space="preserve">
-    <value>&amp;Edit</value>
-  </data>
-  <data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
-    <value>44, 20</value>
-  </data>
-  <data name="helpToolStripMenuItem.Text" xml:space="preserve">
-    <value>&amp;Help</value>
-  </data>
   <data name="menuStrip1.Location" type="System.Drawing.Point, System.Drawing">
     <value>0, 0</value>
   </data>
   <data name="&gt;&gt;menuStrip1.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
+  <data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>37, 20</value>
+  </data>
+  <data name="toolStripMenuItem1.Text" xml:space="preserve">
+    <value>&amp;File</value>
+  </data>
+  <data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
+    <value>93, 22</value>
+  </data>
+  <data name="exitToolStripMenuItem.Text" xml:space="preserve">
+    <value>E&amp;xit</value>
+  </data>
+  <data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
+    <value>39, 20</value>
+  </data>
+  <data name="editToolStripMenuItem.Text" xml:space="preserve">
+    <value>&amp;Edit</value>
+  </data>
+  <data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
+    <value>44, 20</value>
+  </data>
+  <data name="helpToolStripMenuItem.Text" xml:space="preserve">
+    <value>&amp;Help</value>
+  </data>
   <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>132, 17</value>
   </metadata>
   <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
     <value>7</value>
   </data>
+  <data name="&gt;&gt;comboBox_AudioFormat.Name" xml:space="preserve">
+    <value>comboBox_AudioFormat</value>
+  </data>
+  <data name="&gt;&gt;comboBox_AudioFormat.Type" xml:space="preserve">
+    <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;comboBox_AudioFormat.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;comboBox_AudioFormat.ZOrder" xml:space="preserve">
+    <value>0</value>
+  </data>
+  <data name="&gt;&gt;label3.Name" xml:space="preserve">
+    <value>label3</value>
+  </data>
+  <data name="&gt;&gt;label3.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label3.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
+    <value>1</value>
+  </data>
+  <data name="&gt;&gt;button_BrowseAudio.Name" xml:space="preserve">
+    <value>button_BrowseAudio</value>
+  </data>
+  <data name="&gt;&gt;button_BrowseAudio.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;button_BrowseAudio.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;button_BrowseAudio.ZOrder" xml:space="preserve">
+    <value>2</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseAudio.Name" xml:space="preserve">
+    <value>textBox_BrowseAudio</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseAudio.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseAudio.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseAudio.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
+  <data name="&gt;&gt;label2.Name" xml:space="preserve">
+    <value>label2</value>
+  </data>
+  <data name="&gt;&gt;label2.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;label2.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
+    <value>4</value>
+  </data>
+  <data name="&gt;&gt;button_browseDTX.Name" xml:space="preserve">
+    <value>button_browseDTX</value>
+  </data>
+  <data name="&gt;&gt;button_browseDTX.Type" xml:space="preserve">
+    <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;button_browseDTX.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;button_browseDTX.ZOrder" xml:space="preserve">
+    <value>5</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseDTX.Name" xml:space="preserve">
+    <value>textBox_BrowseDTX</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseDTX.Type" xml:space="preserve">
+    <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseDTX.Parent" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;textBox_BrowseDTX.ZOrder" xml:space="preserve">
+    <value>6</value>
+  </data>
+  <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
+    <value>6, 6</value>
+  </data>
+  <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
+    <value>633, 138</value>
+  </data>
+  <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
+    <value>3</value>
+  </data>
+  <data name="groupBox1.Text" xml:space="preserve">
+    <value>変換ファイルの指定</value>
+  </data>
+  <data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
+    <value>groupBox1</value>
+  </data>
+  <data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
+    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+  </data>
+  <data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
+    <value>tabPage1</value>
+  </data>
+  <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
+    <value>3</value>
+  </data>
   <data name="comboBox_AudioFormat.Items" xml:space="preserve">
     <value>WAV</value>
   </data>
   <data name="comboBox_AudioFormat.TabIndex" type="System.Int32, mscorlib">
     <value>0</value>
   </data>
-  <data name="comboBox_AudioFormat.Text" xml:space="preserve">
-    <value>WAV</value>
-  </data>
   <data name="&gt;&gt;comboBox_AudioFormat.Name" xml:space="preserve">
     <value>comboBox_AudioFormat</value>
   </data>
   <data name="&gt;&gt;textBox_BrowseDTX.ZOrder" xml:space="preserve">
     <value>6</value>
   </data>
-  <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
-    <value>6, 6</value>
-  </data>
-  <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
-    <value>633, 138</value>
-  </data>
-  <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
-    <value>3</value>
-  </data>
-  <data name="groupBox1.Text" xml:space="preserve">
-    <value>変換ファイルの指定</value>
-  </data>
-  <data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
-    <value>groupBox1</value>
-  </data>
-  <data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
-    <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
-  </data>
-  <data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
-    <value>tabPage1</value>
-  </data>
-  <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
-    <value>3</value>
-  </data>
   <data name="button_Cancel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
     <value>NoControl</value>
   </data>
   <data name="checkBox_MonitorSound.Text" xml:space="preserve">
     <value>録音中の音をスピーカーに出力する(しかし実現方法不明。WASAPI排他じゃなければやりようがあるのだが)</value>
   </data>
+  <data name="checkBox_MonitorSound.Visible" type="System.Boolean, mscorlib">
+    <value>False</value>
+  </data>
   <data name="&gt;&gt;checkBox_MonitorSound.Name" xml:space="preserve">
     <value>checkBox_MonitorSound</value>
   </data>
   <data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
     <value>2</value>
   </data>
+  <metadata name="bindingSource_Master.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>177, 56</value>
+  </metadata>
   <data name="trackBar_Master.AutoSize" type="System.Boolean, mscorlib">
     <value>False</value>
   </data>
   <data name="&gt;&gt;tabControl1.ZOrder" xml:space="preserve">
     <value>0</value>
   </data>
+  <metadata name="bindingSource_Bass.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>17, 56</value>
+  </metadata>
+  <metadata name="bindingSource_Guitar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>1069, 17</value>
+  </metadata>
+  <metadata name="bindingSource_Drums.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>932, 17</value>
+  </metadata>
+  <metadata name="bindingSource_SE.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>783, 17</value>
+  </metadata>
+  <metadata name="bindingSource_BGM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+    <value>621, 17</value>
+  </metadata>
   <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
     <value>388, 17</value>
   </metadata>
index 3e5e960..53df77f 100644 (file)
                        this.Controls.Add(this.progressBar_Recording);
                        this.Controls.Add(this.label_Recording);
                        this.Controls.Add(this.button_CancelConverting);
+                       this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
                        this.Name = "Form_Recording";
                        this.Load += new System.EventHandler(this.Form_Recording_Load);
                        this.ResumeLayout(false);
index f84c5b6..3c36307 100644 (file)
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
 // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
 // 既定値にすることができます:
 // [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("4.0.0.0")]
-[assembly: AssemblyFileVersion("4.0.0.0")]
+[assembly: AssemblyVersion("5.0.0.0")]
+[assembly: AssemblyFileVersion("5.0.0.0")]
index 128365a..6548bfb 100644 (file)
@@ -130,5 +130,17 @@ namespace DTX2WAV.Properties {
                 this["IsUpgrade"] = value;
             }
         }
+        
+        [global::System.Configuration.UserScopedSettingAttribute()]
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
+        [global::System.Configuration.DefaultSettingValueAttribute("0")]
+        public int nAudioFormat {
+            get {
+                return ((int)(this["nAudioFormat"]));
+            }
+            set {
+                this["nAudioFormat"] = value;
+            }
+        }
     }
 }
index e5f7c87..9ab513b 100644 (file)
@@ -29,5 +29,8 @@
     <Setting Name="IsUpgrade" Type="System.Boolean" Scope="User">
       <Value Profile="(Default)">False</Value>
     </Setting>
+    <Setting Name="nAudioFormat" Type="System.Int32" Scope="User">
+      <Value Profile="(Default)">0</Value>
+    </Setting>
   </Settings>
 </SettingsFile>
\ No newline at end of file
index b4d37d6..e6caeb8 100644 (file)
@@ -850,7 +850,7 @@ namespace DTXMania
                        nChipDisplayTimeMs.Initialize("", "", 0);
                        nChipFadeoutTimeMs.Initialize("", "", 0);
 
-                       nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 101);
+                       nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 201);
                        nPolyphonicSounds.Initialize( "strCfgSysPolyphonicSounds", 1, 11 );
 
                        // dgb
index 9b4e4aa..cd7b340 100644 (file)
@@ -514,7 +514,7 @@ namespace DTXMania
                                                //                                              if ( ( nCurrentTime - this.nBGM再生開始時刻 ) > ( this.nBGMの総再生時間ms - 1000 ) )
                                                if ((nCurrentTime - this.nBGM再生開始時刻) >= (this.nBGMの総再生時間ms))  // #27787 2012.3.10 yyagi 1000ms == フェードイン分の時間
                                                {
-                                                       if (!CDTXMania.Instance.DTXVmode.Enabled)
+                                                       if (!CDTXMania.Instance.DTXVmode.Enabled && !CDTXMania.Instance.DTX2WAVmode.Enabled)
                                                        {
                                                                this.actFO.tフェードアウト開始();
                                                        }
@@ -524,7 +524,7 @@ namespace DTXMania
                                        }
 
                                case CStage.Eフェーズ.共通_フェードアウト:
-                                       if (this.actFO.On進行描画() == 0 && !CDTXMania.Instance.DTXVmode.Enabled)   // DTXVモード時は、フェードアウト省略
+                                       if (this.actFO.On進行描画() == 0 && !CDTXMania.Instance.DTXVmode.Enabled && !CDTXMania.Instance.DTX2WAVmode.Enabled)   // DTXVモード時は、フェードアウト省略
                                                return 0;
 
                                        if (txFilename != null)
index d0e0127..ba49113 100644 (file)
@@ -367,9 +367,20 @@ namespace DTXMania
                                        {
                                                FDK.CSound管理.nMixerVolume[ i ] = DTX2WAVmode.nMixerVolume[ i ];
                                        }
-                                       ConfigIni.nMasterVolume.Value = DTX2WAVmode.nMixerVolume[(int)FDK.CSound.EInstType.Unknown];    // [5](Unknown)のところにMasterVolumeが入ってくるので注意
+                                       ConfigIni.nMasterVolume.Value = DTX2WAVmode.nMixerVolume[(int)FDK.CSound.EInstType.Unknown];    // [5](Unknown)のところにMasterVolumeが入ってくるので注意
+                                                                                                                                                                                                                                       // CSound管理.nMixerVolume[5]は、結局ここからは変更しないため、
+                                                                                                                                                                                                                                       // 事実上初期値=100で固定。
                                        #endregion
                                        #region [ 録音用の本体設定 ]
+
+                                       // 本体プロセスの優先度を少し上げる (最小化状態で動作させると、処理性能が落ちるようなので
+                                       // → ほとんど効果がなかったので止めます
+                                       //Process thisProcess = System.Diagnostics.Process.GetCurrentProcess();
+                                       //thisProcess.PriorityClass = ProcessPriorityClass.AboveNormal;
+
+                                       // エンコーダーのパス設定 (=DLLフォルダ)
+                                       FDK.CSound管理.strEncoderPath = Path.Combine(strEXEのあるフォルダ, "DLL");
+
                                        CDTXMania.Instance.ConfigIni.nSoundDeviceType.Value = ESoundDeviceTypeForConfig.WASAPI_Exclusive;
                                        CDTXMania.Instance.ConfigIni.bEventDrivenWASAPI.Value = false;
 
@@ -436,7 +447,7 @@ namespace DTXMania
                                        CDTXMania.instance.ConfigIni.nChipVolume.Value = 100;
 
                                        //マスターボリューム100
-                                       CDTXMania.instance.ConfigIni.nMasterVolume.Value = 100;
+                                       //CDTXMania.instance.ConfigIni.nMasterVolume.Value = 100;       // DTX2WAV側から設定するので、ここでは触らない
 
                                        //StageFailedオフ
                                        CDTXMania.instance.ConfigIni.bStageFailed.Value = false;
@@ -472,6 +483,9 @@ namespace DTXMania
                                        CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Guitar.Value = false;
                                        CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Bass.Value = false;
 
+                                       // パッド入力等、基本操作の無効化 (ESCを除く)
+                                       //CDTXMania.Instance.ConfigIni.KeyAssign[][];
+                                       
                                        #endregion
                                }
                                else                                                        // 通常のコンパクトモード
@@ -665,7 +679,7 @@ namespace DTXMania
 
                        if (DTX2WAVmode.Enabled)
                        {
-                               this.Window.WindowState = FormWindowState.Minimized;            //DTX2WAVモード時は自動的に最小化したいが、まだうまくいかない
+                               this.Window.WindowState = FormWindowState.Minimized;            //DTX2WAVモード時は自動的に最小化
                        }
 
                        DTX = null;
@@ -1865,6 +1879,10 @@ namespace DTXMania
                                                                DTX.t全チップの再生停止();
                                                                DTX.On非活性化();
                                                                r現在のステージ.On非活性化();
+                                                               if (DTX2WAVmode.Enabled)
+                                                               {
+                                                                       Environment.Exit(0);
+                                                               }
                                                                if (bコンパクトモード)
                                                                {
                                                                        base.Window.Close();
index e95356d..7ad1234 100644 (file)
@@ -209,7 +209,13 @@ namespace FDK
                /// <summary>
                /// 録音機能で使うミキサーボリューム
                /// </summary>
-               public static int[] nMixerVolume = { 100, 100, 100, 100, 100, 100 };    // BGM,SE,Drums,Guitar,Bass,Unknown
+               public static int[] nMixerVolume = { 100, 100, 100, 100, 100, 100 };    // BGM,SE,Drums,Guitar,Bass, Unknown(Unknownだけは外部から更新されないので事実上100で固定)
+
+               /// <summary>
+               /// 録音機能で使う、エンコーダーパス (DLLフォルダ)
+               /// </summary>
+               public static string strEncoderPath;
+
                #endregion
 
 
@@ -382,11 +388,11 @@ namespace FDK
                        switch ( SoundDeviceType )
                        {
                                case ESoundDeviceType.ExclusiveWASAPI:
-                                       SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.排他, SoundDelayExclusiveWASAPI, SoundUpdatePeriodExclusiveWASAPI );
+                                       SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.排他, SoundDelayExclusiveWASAPI, SoundUpdatePeriodExclusiveWASAPI, strRecordFileType, strEncoderPath );
                                        break;
 
                                case ESoundDeviceType.SharedWASAPI:
-                                       SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.共有, SoundDelaySharedWASAPI, SoundUpdatePeriodSharedWASAPI );
+                                       SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.共有, SoundDelaySharedWASAPI, SoundUpdatePeriodSharedWASAPI, strRecordFileType, strEncoderPath );
                                        break;
 
                                case ESoundDeviceType.ASIO:
index 480d811..f7c29bb 100644 (file)
@@ -29,6 +29,8 @@ namespace FDK
                        protected set;
                }
 
+               public string strRecordFileType = null;
+
                // CSoundTimer 用に公開しているプロパティ
 
                public long n経過時間ms
@@ -110,7 +112,7 @@ namespace FDK
                /// <param name="mode"></param>
                /// <param name="n希望バッファサイズms">WASAPIのサウンドバッファサイズ</param>
                /// <param name="n更新間隔ms">サウンドバッファの更新間隔</param>
-               public CSoundDeviceWASAPI( Eデバイスモード mode, long n希望バッファサイズms, long n更新間隔ms )
+               public CSoundDeviceWASAPI( Eデバイスモード mode, long n希望バッファサイズms, long n更新間隔ms, string strRecordFileType, string strEncoderPath )
                {
                        // 初期化。
 
@@ -456,6 +458,13 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s,
                                this.bIsBASSFree = true;
                                throw new Exception( string.Format( "BASSミキサ(mixing)の作成に失敗しました。[{0}]", errcode ) );
                        }
+//                     if (strRecordFileType != "")
+//                     {
+//                             // DTX2WAV時には、マスターボリュームをここで設定する
+//                             // 
+//                             Bass.BASS_ChannelSetAttribute(this.hMixer, BASSAttribute.BASS_ATTRIB_VOL, CSound管理.nMixerVolume[5] / 100.0f);
+//Trace.TraceInformation("Vol5: {0}", CSound管理.nMixerVolume[5]);
+//                     }
 
                        for (int i = 0; i <= (int)CSound.EInstType.Unknown; i++)
                        {
@@ -474,7 +483,7 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s,
 
                                // Mixerのボリューム設定
                                Bass.BASS_ChannelSetAttribute(this.hMixer_Chips[ i ], BASSAttribute.BASS_ATTRIB_VOL, CSound管理.nMixerVolume[ i ] / 100.0f );
-Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
+//Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
 
                                bool b1 = BassMix.BASS_Mixer_StreamAddChannel(this.hMixer, this.hMixer_Chips[i], BASSFlag.BASS_DEFAULT);
                                if (!b1)
@@ -527,12 +536,44 @@ Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
 
 
                        // 録音設定(DTX2WAV)
-                       encoder = new EncoderWAV(this.hMixer_DeviceOut);
-                       encoder.InputFile = null;    //STDIN
-                       encoder.OutputFile = CSound管理.strRecordOutFilename;
-                       encoder.UseAsyncQueue = true;
-                       encoder.Start(null, IntPtr.Zero, true);     // PAUSE状態で録音開始
-
+                       if (strRecordFileType != "")
+                       {
+                               switch (strRecordFileType.ToUpper())
+                               {
+                                       case "WAV":
+                                               encoder = new EncoderWAV(this.hMixer_DeviceOut);
+                                               break;
+                                       case "OGG":
+                                               {
+                                                       var e = new EncoderOGG(this.hMixer_DeviceOut);
+                                                       e.EncoderDirectory = strEncoderPath;
+                                                       e.OGG_UseQualityMode = true;
+                                                       e.OGG_Quality = 8.0f;
+                                                       //e.OGG_Bitrate = 128;
+                                                       //e.OGG_MinBitrate = 0;
+                                                       //e.OGG_MaxBitrate = 0;
+
+                                                       encoder = e;
+                                               }
+                                               break;
+                                       case "MP3":
+                                               {
+                                                       var e = new EncoderLAME(this.hMixer_DeviceOut);
+                                                       e.EncoderDirectory = strEncoderPath;
+                                                       e.LAME_UseVBR = false;
+                                                       e.LAME_Bitrate = 192;
+                                                       encoder = e;
+                                               }
+                                               break;
+                                       default:
+                                               encoder = new EncoderWAV(this.hMixer_DeviceOut);
+                                               break;
+                               }
+                               encoder.InputFile = null;    //STDIN
+                               encoder.OutputFile = CSound管理.strRecordOutFilename;
+                               encoder.UseAsyncQueue = true;
+                               encoder.Start(null, IntPtr.Zero, true);     // PAUSE状態で録音開始
+                       }
                        //Bass.BASS_ChannelSetAttribute(this.hMixer_DeviceOut, BASSAttribute.BASS_ATTRIB_VOL, 0.10f);
                        //Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_GVOL_SAMPLE, 1000);
                        //Bass.BASS_SetVolume(0.1f);
@@ -632,7 +673,7 @@ Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
                protected int hMixer_Record = -1;
                protected int[] hMixer_Chips = new int[(int)CSound.EInstType.Unknown + 1];  //DTX2WAV対応 BGM, SE, Drums...を別々のmixerに入れて、個別に音量変更できるようにする
 
-               protected EncoderWAV encoder;
+               protected BaseEncoder encoder;
                protected int stream;
                protected WASAPIPROC tWasapiProc = null;
 
diff --git a/RuntimeResources/dll/lame.exe b/RuntimeResources/dll/lame.exe
new file mode 100644 (file)
index 0000000..7a623a9
Binary files /dev/null and b/RuntimeResources/dll/lame.exe differ
diff --git a/RuntimeResources/dll/oggenc2.exe b/RuntimeResources/dll/oggenc2.exe
new file mode 100644 (file)
index 0000000..3c40a92
Binary files /dev/null and b/RuntimeResources/dll/oggenc2.exe differ