コミットメタ情報

リビジョン3748d4def191479f44c2888c1fb58714c58331f1 (tree)
日時2018-02-12 01:59:45
作者yyagi <yyagi.dtxmania@gmai...>
コミッターyyagi

ログメッセージ

#28263 DTX2WAV005:

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

変更サマリ

差分

--- a/DTX2WAV/App.config
+++ b/DTX2WAV/App.config
@@ -37,6 +37,9 @@
3737 <setting name="IsUpgrade" serializeAs="String">
3838 <value>False</value>
3939 </setting>
40+ <setting name="nAudioFormat" serializeAs="String">
41+ <value>0</value>
42+ </setting>
4043 </DTX2WAV.Properties.Settings>
4144 </userSettings>
4245 </configuration>
\ No newline at end of file
--- a/DTX2WAV/Form1.Designer.cs
+++ b/DTX2WAV/Form1.Designer.cs
@@ -165,6 +165,7 @@
165165 //
166166 // comboBox_AudioFormat
167167 //
168+ this.comboBox_AudioFormat.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
168169 this.comboBox_AudioFormat.FormattingEnabled = true;
169170 this.comboBox_AudioFormat.Items.AddRange(new object[] {
170171 resources.GetString("comboBox_AudioFormat.Items"),
@@ -277,6 +278,11 @@
277278 //
278279 this.numericUpDown_Master.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Master, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
279280 resources.ApplyResources(this.numericUpDown_Master, "numericUpDown_Master");
281+ this.numericUpDown_Master.Maximum = new decimal(new int[] {
282+ 200,
283+ 0,
284+ 0,
285+ 0});
280286 this.numericUpDown_Master.Name = "numericUpDown_Master";
281287 this.numericUpDown_Master.Value = new decimal(new int[] {
282288 100,
@@ -298,7 +304,7 @@
298304 resources.ApplyResources(this.trackBar_Master, "trackBar_Master");
299305 this.trackBar_Master.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Master, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged));
300306 this.trackBar_Master.LargeChange = 10;
301- this.trackBar_Master.Maximum = 100;
307+ this.trackBar_Master.Maximum = 200;
302308 this.trackBar_Master.Name = "trackBar_Master";
303309 this.trackBar_Master.TickFrequency = 10;
304310 this.trackBar_Master.Value = 100;
--- a/DTX2WAV/Form1.cs
+++ b/DTX2WAV/Form1.cs
@@ -73,6 +73,7 @@ namespace DTX2WAV
7373 numericUpDown_Bass.Value = Properties.Settings.Default.nVol_Bass;
7474 numericUpDown_Master.Value = Properties.Settings.Default.nVol_Master;
7575 checkBox_MonitorSound.Checked = Properties.Settings.Default.bMonitorSound;
76+ comboBox_AudioFormat.SelectedIndex = Properties.Settings.Default.nAudioFormat;
7677 #endregion
7778 }
7879
@@ -231,7 +232,7 @@ namespace DTX2WAV
231232 }
232233 break;
233234
234- default:
235+ default: // DTXMania本体を強制終了した、など
235236 break;
236237
237238 }
@@ -327,6 +328,7 @@ namespace DTX2WAV
327328 Properties.Settings.Default.nVol_Bass = (int)numericUpDown_Bass.Value;
328329 Properties.Settings.Default.nVol_Master = (int)numericUpDown_Master.Value;
329330 Properties.Settings.Default.bMonitorSound = checkBox_MonitorSound.Checked;
331+ Properties.Settings.Default.nAudioFormat = comboBox_AudioFormat.SelectedIndex;
330332 #endregion
331333
332334 Properties.Settings.Default.Save();
--- a/DTX2WAV/Form1.resx
+++ b/DTX2WAV/Form1.resx
@@ -121,30 +121,6 @@
121121 <value>17, 17</value>
122122 </metadata>
123123 <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
124- <data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
125- <value>93, 22</value>
126- </data>
127- <data name="exitToolStripMenuItem.Text" xml:space="preserve">
128- <value>E&amp;xit</value>
129- </data>
130- <data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
131- <value>37, 20</value>
132- </data>
133- <data name="toolStripMenuItem1.Text" xml:space="preserve">
134- <value>&amp;File</value>
135- </data>
136- <data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
137- <value>39, 20</value>
138- </data>
139- <data name="editToolStripMenuItem.Text" xml:space="preserve">
140- <value>&amp;Edit</value>
141- </data>
142- <data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
143- <value>44, 20</value>
144- </data>
145- <data name="helpToolStripMenuItem.Text" xml:space="preserve">
146- <value>&amp;Help</value>
147- </data>
148124 <data name="menuStrip1.Location" type="System.Drawing.Point, System.Drawing">
149125 <value>0, 0</value>
150126 </data>
@@ -170,6 +146,30 @@
170146 <data name="&gt;&gt;menuStrip1.ZOrder" xml:space="preserve">
171147 <value>2</value>
172148 </data>
149+ <data name="toolStripMenuItem1.Size" type="System.Drawing.Size, System.Drawing">
150+ <value>37, 20</value>
151+ </data>
152+ <data name="toolStripMenuItem1.Text" xml:space="preserve">
153+ <value>&amp;File</value>
154+ </data>
155+ <data name="exitToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
156+ <value>93, 22</value>
157+ </data>
158+ <data name="exitToolStripMenuItem.Text" xml:space="preserve">
159+ <value>E&amp;xit</value>
160+ </data>
161+ <data name="editToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
162+ <value>39, 20</value>
163+ </data>
164+ <data name="editToolStripMenuItem.Text" xml:space="preserve">
165+ <value>&amp;Edit</value>
166+ </data>
167+ <data name="helpToolStripMenuItem.Size" type="System.Drawing.Size, System.Drawing">
168+ <value>44, 20</value>
169+ </data>
170+ <data name="helpToolStripMenuItem.Text" xml:space="preserve">
171+ <value>&amp;Help</value>
172+ </data>
173173 <metadata name="statusStrip1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
174174 <value>132, 17</value>
175175 </metadata>
@@ -231,6 +231,114 @@
231231 <data name="&gt;&gt;label1.ZOrder" xml:space="preserve">
232232 <value>7</value>
233233 </data>
234+ <data name="&gt;&gt;comboBox_AudioFormat.Name" xml:space="preserve">
235+ <value>comboBox_AudioFormat</value>
236+ </data>
237+ <data name="&gt;&gt;comboBox_AudioFormat.Type" xml:space="preserve">
238+ <value>System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
239+ </data>
240+ <data name="&gt;&gt;comboBox_AudioFormat.Parent" xml:space="preserve">
241+ <value>groupBox1</value>
242+ </data>
243+ <data name="&gt;&gt;comboBox_AudioFormat.ZOrder" xml:space="preserve">
244+ <value>0</value>
245+ </data>
246+ <data name="&gt;&gt;label3.Name" xml:space="preserve">
247+ <value>label3</value>
248+ </data>
249+ <data name="&gt;&gt;label3.Type" xml:space="preserve">
250+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
251+ </data>
252+ <data name="&gt;&gt;label3.Parent" xml:space="preserve">
253+ <value>groupBox1</value>
254+ </data>
255+ <data name="&gt;&gt;label3.ZOrder" xml:space="preserve">
256+ <value>1</value>
257+ </data>
258+ <data name="&gt;&gt;button_BrowseAudio.Name" xml:space="preserve">
259+ <value>button_BrowseAudio</value>
260+ </data>
261+ <data name="&gt;&gt;button_BrowseAudio.Type" xml:space="preserve">
262+ <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
263+ </data>
264+ <data name="&gt;&gt;button_BrowseAudio.Parent" xml:space="preserve">
265+ <value>groupBox1</value>
266+ </data>
267+ <data name="&gt;&gt;button_BrowseAudio.ZOrder" xml:space="preserve">
268+ <value>2</value>
269+ </data>
270+ <data name="&gt;&gt;textBox_BrowseAudio.Name" xml:space="preserve">
271+ <value>textBox_BrowseAudio</value>
272+ </data>
273+ <data name="&gt;&gt;textBox_BrowseAudio.Type" xml:space="preserve">
274+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
275+ </data>
276+ <data name="&gt;&gt;textBox_BrowseAudio.Parent" xml:space="preserve">
277+ <value>groupBox1</value>
278+ </data>
279+ <data name="&gt;&gt;textBox_BrowseAudio.ZOrder" xml:space="preserve">
280+ <value>3</value>
281+ </data>
282+ <data name="&gt;&gt;label2.Name" xml:space="preserve">
283+ <value>label2</value>
284+ </data>
285+ <data name="&gt;&gt;label2.Type" xml:space="preserve">
286+ <value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
287+ </data>
288+ <data name="&gt;&gt;label2.Parent" xml:space="preserve">
289+ <value>groupBox1</value>
290+ </data>
291+ <data name="&gt;&gt;label2.ZOrder" xml:space="preserve">
292+ <value>4</value>
293+ </data>
294+ <data name="&gt;&gt;button_browseDTX.Name" xml:space="preserve">
295+ <value>button_browseDTX</value>
296+ </data>
297+ <data name="&gt;&gt;button_browseDTX.Type" xml:space="preserve">
298+ <value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
299+ </data>
300+ <data name="&gt;&gt;button_browseDTX.Parent" xml:space="preserve">
301+ <value>groupBox1</value>
302+ </data>
303+ <data name="&gt;&gt;button_browseDTX.ZOrder" xml:space="preserve">
304+ <value>5</value>
305+ </data>
306+ <data name="&gt;&gt;textBox_BrowseDTX.Name" xml:space="preserve">
307+ <value>textBox_BrowseDTX</value>
308+ </data>
309+ <data name="&gt;&gt;textBox_BrowseDTX.Type" xml:space="preserve">
310+ <value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
311+ </data>
312+ <data name="&gt;&gt;textBox_BrowseDTX.Parent" xml:space="preserve">
313+ <value>groupBox1</value>
314+ </data>
315+ <data name="&gt;&gt;textBox_BrowseDTX.ZOrder" xml:space="preserve">
316+ <value>6</value>
317+ </data>
318+ <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
319+ <value>6, 6</value>
320+ </data>
321+ <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
322+ <value>633, 138</value>
323+ </data>
324+ <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
325+ <value>3</value>
326+ </data>
327+ <data name="groupBox1.Text" xml:space="preserve">
328+ <value>変換ファイルの指定</value>
329+ </data>
330+ <data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
331+ <value>groupBox1</value>
332+ </data>
333+ <data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
334+ <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
335+ </data>
336+ <data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
337+ <value>tabPage1</value>
338+ </data>
339+ <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
340+ <value>3</value>
341+ </data>
234342 <data name="comboBox_AudioFormat.Items" xml:space="preserve">
235343 <value>WAV</value>
236344 </data>
@@ -249,9 +357,6 @@
249357 <data name="comboBox_AudioFormat.TabIndex" type="System.Int32, mscorlib">
250358 <value>0</value>
251359 </data>
252- <data name="comboBox_AudioFormat.Text" xml:space="preserve">
253- <value>WAV</value>
254- </data>
255360 <data name="&gt;&gt;comboBox_AudioFormat.Name" xml:space="preserve">
256361 <value>comboBox_AudioFormat</value>
257362 </data>
@@ -420,30 +525,6 @@
420525 <data name="&gt;&gt;textBox_BrowseDTX.ZOrder" xml:space="preserve">
421526 <value>6</value>
422527 </data>
423- <data name="groupBox1.Location" type="System.Drawing.Point, System.Drawing">
424- <value>6, 6</value>
425- </data>
426- <data name="groupBox1.Size" type="System.Drawing.Size, System.Drawing">
427- <value>633, 138</value>
428- </data>
429- <data name="groupBox1.TabIndex" type="System.Int32, mscorlib">
430- <value>3</value>
431- </data>
432- <data name="groupBox1.Text" xml:space="preserve">
433- <value>変換ファイルの指定</value>
434- </data>
435- <data name="&gt;&gt;groupBox1.Name" xml:space="preserve">
436- <value>groupBox1</value>
437- </data>
438- <data name="&gt;&gt;groupBox1.Type" xml:space="preserve">
439- <value>System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
440- </data>
441- <data name="&gt;&gt;groupBox1.Parent" xml:space="preserve">
442- <value>tabPage1</value>
443- </data>
444- <data name="&gt;&gt;groupBox1.ZOrder" xml:space="preserve">
445- <value>3</value>
446- </data>
447528 <data name="button_Cancel.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
448529 <value>NoControl</value>
449530 </data>
@@ -516,6 +597,9 @@
516597 <data name="checkBox_MonitorSound.Text" xml:space="preserve">
517598 <value>録音中の音をスピーカーに出力する(しかし実現方法不明。WASAPI排他じゃなければやりようがあるのだが)</value>
518599 </data>
600+ <data name="checkBox_MonitorSound.Visible" type="System.Boolean, mscorlib">
601+ <value>False</value>
602+ </data>
519603 <data name="&gt;&gt;checkBox_MonitorSound.Name" xml:space="preserve">
520604 <value>checkBox_MonitorSound</value>
521605 </data>
@@ -582,6 +666,9 @@
582666 <data name="&gt;&gt;label9.ZOrder" xml:space="preserve">
583667 <value>2</value>
584668 </data>
669+ <metadata name="bindingSource_Master.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
670+ <value>177, 56</value>
671+ </metadata>
585672 <data name="trackBar_Master.AutoSize" type="System.Boolean, mscorlib">
586673 <value>False</value>
587674 </data>
@@ -1113,6 +1200,21 @@
11131200 <data name="&gt;&gt;tabControl1.ZOrder" xml:space="preserve">
11141201 <value>0</value>
11151202 </data>
1203+ <metadata name="bindingSource_Bass.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1204+ <value>17, 56</value>
1205+ </metadata>
1206+ <metadata name="bindingSource_Guitar.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1207+ <value>1069, 17</value>
1208+ </metadata>
1209+ <metadata name="bindingSource_Drums.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1210+ <value>932, 17</value>
1211+ </metadata>
1212+ <metadata name="bindingSource_SE.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1213+ <value>783, 17</value>
1214+ </metadata>
1215+ <metadata name="bindingSource_BGM.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
1216+ <value>621, 17</value>
1217+ </metadata>
11161218 <metadata name="saveFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
11171219 <value>388, 17</value>
11181220 </metadata>
--- a/DTX2WAV/Form_Recording.Designer.cs
+++ b/DTX2WAV/Form_Recording.Designer.cs
@@ -140,6 +140,7 @@
140140 this.Controls.Add(this.progressBar_Recording);
141141 this.Controls.Add(this.label_Recording);
142142 this.Controls.Add(this.button_CancelConverting);
143+ this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedToolWindow;
143144 this.Name = "Form_Recording";
144145 this.Load += new System.EventHandler(this.Form_Recording_Load);
145146 this.ResumeLayout(false);
--- a/DTX2WAV/Properties/AssemblyInfo.cs
+++ b/DTX2WAV/Properties/AssemblyInfo.cs
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
3232 // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
3333 // 既定値にすることができます:
3434 // [assembly: AssemblyVersion("1.0.*")]
35-[assembly: AssemblyVersion("4.0.0.0")]
36-[assembly: AssemblyFileVersion("4.0.0.0")]
35+[assembly: AssemblyVersion("5.0.0.0")]
36+[assembly: AssemblyFileVersion("5.0.0.0")]
--- a/DTX2WAV/Properties/Settings.Designer.cs
+++ b/DTX2WAV/Properties/Settings.Designer.cs
@@ -130,5 +130,17 @@ namespace DTX2WAV.Properties {
130130 this["IsUpgrade"] = value;
131131 }
132132 }
133+
134+ [global::System.Configuration.UserScopedSettingAttribute()]
135+ [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
136+ [global::System.Configuration.DefaultSettingValueAttribute("0")]
137+ public int nAudioFormat {
138+ get {
139+ return ((int)(this["nAudioFormat"]));
140+ }
141+ set {
142+ this["nAudioFormat"] = value;
143+ }
144+ }
133145 }
134146 }
--- a/DTX2WAV/Properties/Settings.settings
+++ b/DTX2WAV/Properties/Settings.settings
@@ -29,5 +29,8 @@
2929 <Setting Name="IsUpgrade" Type="System.Boolean" Scope="User">
3030 <Value Profile="(Default)">False</Value>
3131 </Setting>
32+ <Setting Name="nAudioFormat" Type="System.Int32" Scope="User">
33+ <Value Profile="(Default)">0</Value>
34+ </Setting>
3235 </Settings>
3336 </SettingsFile>
\ No newline at end of file
--- a/DTXMania/コード/ステージ/04.コンフィグ/CConfigXml.cs
+++ b/DTXMania/コード/ステージ/04.コンフィグ/CConfigXml.cs
@@ -850,7 +850,7 @@ namespace DTXMania
850850 nChipDisplayTimeMs.Initialize("", "", 0);
851851 nChipFadeoutTimeMs.Initialize("", "", 0);
852852
853- nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 101);
853+ nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 201);
854854 nPolyphonicSounds.Initialize( "strCfgSysPolyphonicSounds", 1, 11 );
855855
856856 // dgb
--- a/DTXMania/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs
+++ b/DTXMania/コード/ステージ/06.曲読み込み/CStage曲読み込み.cs
@@ -514,7 +514,7 @@ namespace DTXMania
514514 // if ( ( nCurrentTime - this.nBGM再生開始時刻 ) > ( this.nBGMの総再生時間ms - 1000 ) )
515515 if ((nCurrentTime - this.nBGM再生開始時刻) >= (this.nBGMの総再生時間ms)) // #27787 2012.3.10 yyagi 1000ms == フェードイン分の時間
516516 {
517- if (!CDTXMania.Instance.DTXVmode.Enabled)
517+ if (!CDTXMania.Instance.DTXVmode.Enabled && !CDTXMania.Instance.DTX2WAVmode.Enabled)
518518 {
519519 this.actFO.tフェードアウト開始();
520520 }
@@ -524,7 +524,7 @@ namespace DTXMania
524524 }
525525
526526 case CStage.Eフェーズ.共通_フェードアウト:
527- if (this.actFO.On進行描画() == 0 && !CDTXMania.Instance.DTXVmode.Enabled) // DTXVモード時は、フェードアウト省略
527+ if (this.actFO.On進行描画() == 0 && !CDTXMania.Instance.DTXVmode.Enabled && !CDTXMania.Instance.DTX2WAVmode.Enabled) // DTXVモード時は、フェードアウト省略
528528 return 0;
529529
530530 if (txFilename != null)
--- a/DTXMania/コード/全体/CDTXMania.cs
+++ b/DTXMania/コード/全体/CDTXMania.cs
@@ -367,9 +367,20 @@ namespace DTXMania
367367 {
368368 FDK.CSound管理.nMixerVolume[ i ] = DTX2WAVmode.nMixerVolume[ i ];
369369 }
370- ConfigIni.nMasterVolume.Value = DTX2WAVmode.nMixerVolume[(int)FDK.CSound.EInstType.Unknown]; // [5](Unknown)のところにMasterVolumeが入ってくるので注意
370+ ConfigIni.nMasterVolume.Value = DTX2WAVmode.nMixerVolume[(int)FDK.CSound.EInstType.Unknown]; // [5](Unknown)のところにMasterVolumeが入ってくるので注意
371+ // CSound管理.nMixerVolume[5]は、結局ここからは変更しないため、
372+ // 事実上初期値=100で固定。
371373 #endregion
372374 #region [ 録音用の本体設定 ]
375+
376+ // 本体プロセスの優先度を少し上げる (最小化状態で動作させると、処理性能が落ちるようなので
377+ // → ほとんど効果がなかったので止めます
378+ //Process thisProcess = System.Diagnostics.Process.GetCurrentProcess();
379+ //thisProcess.PriorityClass = ProcessPriorityClass.AboveNormal;
380+
381+ // エンコーダーのパス設定 (=DLLフォルダ)
382+ FDK.CSound管理.strEncoderPath = Path.Combine(strEXEのあるフォルダ, "DLL");
383+
373384 CDTXMania.Instance.ConfigIni.nSoundDeviceType.Value = ESoundDeviceTypeForConfig.WASAPI_Exclusive;
374385 CDTXMania.Instance.ConfigIni.bEventDrivenWASAPI.Value = false;
375386
@@ -436,7 +447,7 @@ namespace DTXMania
436447 CDTXMania.instance.ConfigIni.nChipVolume.Value = 100;
437448
438449 //マスターボリューム100
439- CDTXMania.instance.ConfigIni.nMasterVolume.Value = 100;
450+ //CDTXMania.instance.ConfigIni.nMasterVolume.Value = 100; // DTX2WAV側から設定するので、ここでは触らない
440451
441452 //StageFailedオフ
442453 CDTXMania.instance.ConfigIni.bStageFailed.Value = false;
@@ -472,6 +483,9 @@ namespace DTXMania
472483 CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Guitar.Value = false;
473484 CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Bass.Value = false;
474485
486+ // パッド入力等、基本操作の無効化 (ESCを除く)
487+ //CDTXMania.Instance.ConfigIni.KeyAssign[][];
488+
475489 #endregion
476490 }
477491 else // 通常のコンパクトモード
@@ -665,7 +679,7 @@ namespace DTXMania
665679
666680 if (DTX2WAVmode.Enabled)
667681 {
668- this.Window.WindowState = FormWindowState.Minimized; //DTX2WAVモード時は自動的に最小化したいが、まだうまくいかない
682+ this.Window.WindowState = FormWindowState.Minimized; //DTX2WAVモード時は自動的に最小化
669683 }
670684
671685 DTX = null;
@@ -1865,6 +1879,10 @@ namespace DTXMania
18651879 DTX.t全チップの再生停止();
18661880 DTX.On非活性化();
18671881 r現在のステージ.On非活性化();
1882+ if (DTX2WAVmode.Enabled)
1883+ {
1884+ Environment.Exit(0);
1885+ }
18681886 if (bコンパクトモード)
18691887 {
18701888 base.Window.Close();
--- a/FDK/コード/03.サウンド/CSound.cs
+++ b/FDK/コード/03.サウンド/CSound.cs
@@ -209,7 +209,13 @@ namespace FDK
209209 /// <summary>
210210 /// 録音機能で使うミキサーボリューム
211211 /// </summary>
212- public static int[] nMixerVolume = { 100, 100, 100, 100, 100, 100 }; // BGM,SE,Drums,Guitar,Bass,Unknown
212+ public static int[] nMixerVolume = { 100, 100, 100, 100, 100, 100 }; // BGM,SE,Drums,Guitar,Bass, Unknown(Unknownだけは外部から更新されないので事実上100で固定)
213+
214+ /// <summary>
215+ /// 録音機能で使う、エンコーダーパス (DLLフォルダ)
216+ /// </summary>
217+ public static string strEncoderPath;
218+
213219 #endregion
214220
215221
@@ -382,11 +388,11 @@ namespace FDK
382388 switch ( SoundDeviceType )
383389 {
384390 case ESoundDeviceType.ExclusiveWASAPI:
385- SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.排他, SoundDelayExclusiveWASAPI, SoundUpdatePeriodExclusiveWASAPI );
391+ SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.排他, SoundDelayExclusiveWASAPI, SoundUpdatePeriodExclusiveWASAPI, strRecordFileType, strEncoderPath );
386392 break;
387393
388394 case ESoundDeviceType.SharedWASAPI:
389- SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.共有, SoundDelaySharedWASAPI, SoundUpdatePeriodSharedWASAPI );
395+ SoundDevice = new CSoundDeviceWASAPI( CSoundDeviceWASAPI.Eデバイスモード.共有, SoundDelaySharedWASAPI, SoundUpdatePeriodSharedWASAPI, strRecordFileType, strEncoderPath );
390396 break;
391397
392398 case ESoundDeviceType.ASIO:
--- a/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs
+++ b/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs
@@ -29,6 +29,8 @@ namespace FDK
2929 protected set;
3030 }
3131
32+ public string strRecordFileType = null;
33+
3234 // CSoundTimer 用に公開しているプロパティ
3335
3436 public long n経過時間ms
@@ -110,7 +112,7 @@ namespace FDK
110112 /// <param name="mode"></param>
111113 /// <param name="n希望バッファサイズms">WASAPIのサウンドバッファサイズ</param>
112114 /// <param name="n更新間隔ms">サウンドバッファの更新間隔</param>
113- public CSoundDeviceWASAPI( Eデバイスモード mode, long n希望バッファサイズms, long n更新間隔ms )
115+ public CSoundDeviceWASAPI( Eデバイスモード mode, long n希望バッファサイズms, long n更新間隔ms, string strRecordFileType, string strEncoderPath )
114116 {
115117 // 初期化。
116118
@@ -456,6 +458,13 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s,
456458 this.bIsBASSFree = true;
457459 throw new Exception( string.Format( "BASSミキサ(mixing)の作成に失敗しました。[{0}]", errcode ) );
458460 }
461+// if (strRecordFileType != "")
462+// {
463+// // DTX2WAV時には、マスターボリュームをここで設定する
464+// //
465+// Bass.BASS_ChannelSetAttribute(this.hMixer, BASSAttribute.BASS_ATTRIB_VOL, CSound管理.nMixerVolume[5] / 100.0f);
466+//Trace.TraceInformation("Vol5: {0}", CSound管理.nMixerVolume[5]);
467+// }
459468
460469 for (int i = 0; i <= (int)CSound.EInstType.Unknown; i++)
461470 {
@@ -474,7 +483,7 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s,
474483
475484 // Mixerのボリューム設定
476485 Bass.BASS_ChannelSetAttribute(this.hMixer_Chips[ i ], BASSAttribute.BASS_ATTRIB_VOL, CSound管理.nMixerVolume[ i ] / 100.0f );
477-Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
486+//Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
478487
479488 bool b1 = BassMix.BASS_Mixer_StreamAddChannel(this.hMixer, this.hMixer_Chips[i], BASSFlag.BASS_DEFAULT);
480489 if (!b1)
@@ -527,12 +536,44 @@ Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
527536
528537
529538 // 録音設定(DTX2WAV)
530- encoder = new EncoderWAV(this.hMixer_DeviceOut);
531- encoder.InputFile = null; //STDIN
532- encoder.OutputFile = CSound管理.strRecordOutFilename;
533- encoder.UseAsyncQueue = true;
534- encoder.Start(null, IntPtr.Zero, true); // PAUSE状態で録音開始
535-
539+ if (strRecordFileType != "")
540+ {
541+ switch (strRecordFileType.ToUpper())
542+ {
543+ case "WAV":
544+ encoder = new EncoderWAV(this.hMixer_DeviceOut);
545+ break;
546+ case "OGG":
547+ {
548+ var e = new EncoderOGG(this.hMixer_DeviceOut);
549+ e.EncoderDirectory = strEncoderPath;
550+ e.OGG_UseQualityMode = true;
551+ e.OGG_Quality = 8.0f;
552+ //e.OGG_Bitrate = 128;
553+ //e.OGG_MinBitrate = 0;
554+ //e.OGG_MaxBitrate = 0;
555+
556+ encoder = e;
557+ }
558+ break;
559+ case "MP3":
560+ {
561+ var e = new EncoderLAME(this.hMixer_DeviceOut);
562+ e.EncoderDirectory = strEncoderPath;
563+ e.LAME_UseVBR = false;
564+ e.LAME_Bitrate = 192;
565+ encoder = e;
566+ }
567+ break;
568+ default:
569+ encoder = new EncoderWAV(this.hMixer_DeviceOut);
570+ break;
571+ }
572+ encoder.InputFile = null; //STDIN
573+ encoder.OutputFile = CSound管理.strRecordOutFilename;
574+ encoder.UseAsyncQueue = true;
575+ encoder.Start(null, IntPtr.Zero, true); // PAUSE状態で録音開始
576+ }
536577 //Bass.BASS_ChannelSetAttribute(this.hMixer_DeviceOut, BASSAttribute.BASS_ATTRIB_VOL, 0.10f);
537578 //Bass.BASS_SetConfig(BASSConfig.BASS_CONFIG_GVOL_SAMPLE, 1000);
538579 //Bass.BASS_SetVolume(0.1f);
@@ -632,7 +673,7 @@ Trace.TraceInformation("Vol{0}: {1}", i, CSound管理.nMixerVolume[i]);
632673 protected int hMixer_Record = -1;
633674 protected int[] hMixer_Chips = new int[(int)CSound.EInstType.Unknown + 1]; //DTX2WAV対応 BGM, SE, Drums...を別々のmixerに入れて、個別に音量変更できるようにする
634675
635- protected EncoderWAV encoder;
676+ protected BaseEncoder encoder;
636677 protected int stream;
637678 protected WASAPIPROC tWasapiProc = null;
638679
Binary files /dev/null and b/RuntimeResources/dll/lame.exe differ
Binary files /dev/null and b/RuntimeResources/dll/oggenc2.exe differ
旧リポジトリブラウザで表示