From ef7605d154e29b65f4b5213ec042eb2e0f9c4fe8 Mon Sep 17 00:00:00 2001 From: yyagi Date: Thu, 22 Feb 2018 00:56:23 +0900 Subject: [PATCH] =?utf8?q?#28263:=20DTX2WAV007:=20=20*=20ogg=E3=81=A8mp3?= =?utf8?q?=E3=81=AE=E3=82=A8=E3=83=B3=E3=82=B3=E3=83=BC=E3=83=89=E8=A8=AD?= =?utf8?q?=E5=AE=9A=E3=82=92=E8=BF=BD=E5=8A=A0=E3=80=82(=E3=81=A8=E3=81=84?= =?utf8?q?=E3=81=A3=E3=81=A6=E3=82=82=E3=80=81=E3=83=93=E3=83=83=E3=83=88?= =?utf8?q?=E3=83=AC=E3=83=BC=E3=83=88=E8=A8=AD=E5=AE=9A=E3=81=AE=E3=81=BF?= =?utf8?q?=E3=81=A7=E3=81=99=E3=81=8C=E3=80=82ogg=E3=81=AFQ=E5=80=A4?= =?utf8?q?=E8=A8=AD=E5=AE=9A=E3=81=AE=E3=81=BF=E3=80=81mp3=E3=81=AFCBR?= =?utf8?q?=E3=81=AE=E3=83=93=E3=83=83=E3=83=88=E3=83=AC=E3=83=BC=E3=83=88?= =?utf8?q?=E6=8C=87=E5=AE=9A=E3=81=AE=E3=81=BF=E3=80=82)=20=20*=20DTXMania?= =?utf8?q?=E6=9C=AC=E4=BD=93=E3=81=8C=E3=81=AA=E3=81=84=E6=99=82=E3=81=AE?= =?utf8?q?=E4=BE=8B=E5=A4=96=E5=87=A6=E7=90=86=E8=BF=BD=E5=8A=A0=20=20*=20?= =?utf8?q?=E3=82=A6=E3=82=A4=E3=83=B3=E3=83=89=E3=82=A6=E3=83=AA=E3=82=B5?= =?utf8?q?=E3=82=A4=E3=82=BA=E5=AF=BE=E5=BF=9C(=E9=81=93=E5=8D=8A=E3=81=B0?= =?utf8?q?)=20=20*=20=E3=81=9D=E3=82=8C=E3=81=AA=E3=82=8A=E3=81=AB?= =?utf8?q?=E3=82=BF=E3=83=96=E3=82=AA=E3=83=BC=E3=83=80=E3=83=BC=E3=82=92?= =?utf8?q?=E8=A8=AD=E5=AE=9A=20#xxxxx=20DTXMania=E6=9C=AC=E4=BD=93:=20?= =?utf8?q?=E8=A8=AD=E5=AE=9A=E7=94=BB=E9=9D=A2=E3=81=AE=E3=83=95=E3=82=A9?= =?utf8?q?=E3=83=B3=E3=83=88=E6=8C=87=E5=AE=9A=E6=A9=9F=E8=83=BD=E3=82=92?= =?utf8?q?=E8=BF=BD=E5=8A=A0=E3=80=82(resources.csv=E3=83=95=E3=82=A1?= =?utf8?q?=E3=82=A4=E3=83=AB=E3=81=A7=E8=A8=AD=E5=AE=9A)?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- DTX2WAV/App.config | 8 +- DTX2WAV/Form1.Designer.cs | 208 +++++-- DTX2WAV/Form1.cs | 71 ++- DTX2WAV/Form1.resx | 620 ++++++++++++++------- DTX2WAV/Form_Recording.resx | 6 +- DTX2WAV/Properties/AssemblyInfo.cs | 4 +- DTX2WAV/Properties/Settings.Designer.cs | 26 +- DTX2WAV/Properties/Settings.settings | 8 +- .../04.コンフィグ/CActConfigList.cs | 9 +- DTXMania/コード/全体/CDTXMania.cs | 29 +- FDK/コード/03.サウンド/CSound.cs | 11 + .../03.サウンド/CSoundDeviceWASAPI.cs | 12 +- 12 files changed, 716 insertions(+), 296 deletions(-) diff --git a/DTX2WAV/App.config b/DTX2WAV/App.config index 266c2b1c..94be76dd 100644 --- a/DTX2WAV/App.config +++ b/DTX2WAV/App.config @@ -29,7 +29,7 @@ 100 - 0 + 100 True @@ -40,6 +40,12 @@ 0 + + 10 + + + 4 + \ No newline at end of file diff --git a/DTX2WAV/Form1.Designer.cs b/DTX2WAV/Form1.Designer.cs index c5b45a86..40d2cbf6 100644 --- a/DTX2WAV/Form1.Designer.cs +++ b/DTX2WAV/Form1.Designer.cs @@ -38,7 +38,7 @@ this.statusStrip1 = new System.Windows.Forms.StatusStrip(); this.openFileDialog1 = new System.Windows.Forms.OpenFileDialog(); this.label1 = new System.Windows.Forms.Label(); - this.groupBox1 = new System.Windows.Forms.GroupBox(); + this.groupBox_recfiles = new System.Windows.Forms.GroupBox(); this.comboBox_AudioFormat = new System.Windows.Forms.ComboBox(); this.label3 = new System.Windows.Forms.Label(); this.button_BrowseAudio = new System.Windows.Forms.Button(); @@ -50,7 +50,7 @@ this.tabPage1 = new System.Windows.Forms.TabPage(); this.button_Cancel = new System.Windows.Forms.Button(); this.button_Convert = new System.Windows.Forms.Button(); - this.groupBox2 = new System.Windows.Forms.GroupBox(); + this.groupBox_volumes = new System.Windows.Forms.GroupBox(); this.checkBox_MonitorSound = new System.Windows.Forms.CheckBox(); this.numericUpDown_Master = new System.Windows.Forms.NumericUpDown(); this.bindingSource_Master = new System.Windows.Forms.BindingSource(this.components); @@ -77,13 +77,21 @@ this.label4 = new System.Windows.Forms.Label(); this.trackBar_BGM = new System.Windows.Forms.TrackBar(); this.tabPage2 = new System.Windows.Forms.TabPage(); + this.groupBox_MP3 = new System.Windows.Forms.GroupBox(); + this.label11 = new System.Windows.Forms.Label(); + this.groupBox_Ogg = new System.Windows.Forms.GroupBox(); + this.numericUpDown_Ogg_Q = new System.Windows.Forms.NumericUpDown(); + this.bindingSource_Ogg_Q = new System.Windows.Forms.BindingSource(this.components); + this.label10 = new System.Windows.Forms.Label(); + this.trackBar_Ogg_Q = new System.Windows.Forms.TrackBar(); this.saveFileDialog1 = new System.Windows.Forms.SaveFileDialog(); this.toolTip1 = new System.Windows.Forms.ToolTip(this.components); + this.comboBox_MP3_bps = new System.Windows.Forms.ComboBox(); this.menuStrip1.SuspendLayout(); - this.groupBox1.SuspendLayout(); + this.groupBox_recfiles.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); - this.groupBox2.SuspendLayout(); + this.groupBox_volumes.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_Master)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource_Master)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar_Master)).BeginInit(); @@ -102,6 +110,12 @@ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_BGM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource_BGM)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar_BGM)).BeginInit(); + this.tabPage2.SuspendLayout(); + this.groupBox_MP3.SuspendLayout(); + this.groupBox_Ogg.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_Ogg_Q)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource_Ogg_Q)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar_Ogg_Q)).BeginInit(); this.SuspendLayout(); // // menuStrip1 @@ -149,19 +163,19 @@ resources.ApplyResources(this.label1, "label1"); this.label1.Name = "label1"; // - // groupBox1 + // groupBox_recfiles // - this.groupBox1.Controls.Add(this.comboBox_AudioFormat); - this.groupBox1.Controls.Add(this.label3); - this.groupBox1.Controls.Add(this.button_BrowseAudio); - this.groupBox1.Controls.Add(this.textBox_BrowseAudio); - this.groupBox1.Controls.Add(this.label2); - this.groupBox1.Controls.Add(this.button_browseDTX); - this.groupBox1.Controls.Add(this.textBox_BrowseDTX); - this.groupBox1.Controls.Add(this.label1); - resources.ApplyResources(this.groupBox1, "groupBox1"); - this.groupBox1.Name = "groupBox1"; - this.groupBox1.TabStop = false; + resources.ApplyResources(this.groupBox_recfiles, "groupBox_recfiles"); + this.groupBox_recfiles.Controls.Add(this.comboBox_AudioFormat); + this.groupBox_recfiles.Controls.Add(this.label3); + this.groupBox_recfiles.Controls.Add(this.button_BrowseAudio); + this.groupBox_recfiles.Controls.Add(this.textBox_BrowseAudio); + this.groupBox_recfiles.Controls.Add(this.label2); + this.groupBox_recfiles.Controls.Add(this.button_browseDTX); + this.groupBox_recfiles.Controls.Add(this.textBox_BrowseDTX); + this.groupBox_recfiles.Controls.Add(this.label1); + this.groupBox_recfiles.Name = "groupBox_recfiles"; + this.groupBox_recfiles.TabStop = false; // // comboBox_AudioFormat // @@ -216,13 +230,14 @@ resources.ApplyResources(this.tabControl1, "tabControl1"); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; + this.tabControl1.SelectedIndexChanged += new System.EventHandler(this.tabControl1_SelectedIndexChanged); // // tabPage1 // this.tabPage1.Controls.Add(this.button_Cancel); this.tabPage1.Controls.Add(this.button_Convert); - this.tabPage1.Controls.Add(this.groupBox2); - this.tabPage1.Controls.Add(this.groupBox1); + this.tabPage1.Controls.Add(this.groupBox_volumes); + this.tabPage1.Controls.Add(this.groupBox_recfiles); resources.ApplyResources(this.tabPage1, "tabPage1"); this.tabPage1.Name = "tabPage1"; this.tabPage1.UseVisualStyleBackColor = true; @@ -241,30 +256,30 @@ this.button_Convert.UseVisualStyleBackColor = true; this.button_Convert.Click += new System.EventHandler(this.button_Convert_Click); // - // groupBox2 - // - this.groupBox2.Controls.Add(this.checkBox_MonitorSound); - this.groupBox2.Controls.Add(this.numericUpDown_Master); - this.groupBox2.Controls.Add(this.label9); - this.groupBox2.Controls.Add(this.trackBar_Master); - this.groupBox2.Controls.Add(this.numericUpDown_Bass); - this.groupBox2.Controls.Add(this.label8); - this.groupBox2.Controls.Add(this.trackBar_Bass); - this.groupBox2.Controls.Add(this.numericUpDown_Guitar); - this.groupBox2.Controls.Add(this.label7); - this.groupBox2.Controls.Add(this.trackBar_Guitar); - this.groupBox2.Controls.Add(this.numericUpDown_Drums); - this.groupBox2.Controls.Add(this.label6); - this.groupBox2.Controls.Add(this.trackBar_Drums); - this.groupBox2.Controls.Add(this.numericUpDown_SE); - this.groupBox2.Controls.Add(this.label5); - this.groupBox2.Controls.Add(this.trackBar_SE); - this.groupBox2.Controls.Add(this.numericUpDown_BGM); - this.groupBox2.Controls.Add(this.label4); - this.groupBox2.Controls.Add(this.trackBar_BGM); - resources.ApplyResources(this.groupBox2, "groupBox2"); - this.groupBox2.Name = "groupBox2"; - this.groupBox2.TabStop = false; + // groupBox_volumes + // + resources.ApplyResources(this.groupBox_volumes, "groupBox_volumes"); + this.groupBox_volumes.Controls.Add(this.checkBox_MonitorSound); + this.groupBox_volumes.Controls.Add(this.numericUpDown_Master); + this.groupBox_volumes.Controls.Add(this.label9); + this.groupBox_volumes.Controls.Add(this.trackBar_Master); + this.groupBox_volumes.Controls.Add(this.numericUpDown_Bass); + this.groupBox_volumes.Controls.Add(this.label8); + this.groupBox_volumes.Controls.Add(this.trackBar_Bass); + this.groupBox_volumes.Controls.Add(this.numericUpDown_Guitar); + this.groupBox_volumes.Controls.Add(this.label7); + this.groupBox_volumes.Controls.Add(this.trackBar_Guitar); + this.groupBox_volumes.Controls.Add(this.numericUpDown_Drums); + this.groupBox_volumes.Controls.Add(this.label6); + this.groupBox_volumes.Controls.Add(this.trackBar_Drums); + this.groupBox_volumes.Controls.Add(this.numericUpDown_SE); + this.groupBox_volumes.Controls.Add(this.label5); + this.groupBox_volumes.Controls.Add(this.trackBar_SE); + this.groupBox_volumes.Controls.Add(this.numericUpDown_BGM); + this.groupBox_volumes.Controls.Add(this.label4); + this.groupBox_volumes.Controls.Add(this.trackBar_BGM); + this.groupBox_volumes.Name = "groupBox_volumes"; + this.groupBox_volumes.TabStop = false; // // checkBox_MonitorSound // @@ -486,10 +501,91 @@ // // tabPage2 // + this.tabPage2.Controls.Add(this.groupBox_MP3); + this.tabPage2.Controls.Add(this.groupBox_Ogg); resources.ApplyResources(this.tabPage2, "tabPage2"); this.tabPage2.Name = "tabPage2"; this.tabPage2.UseVisualStyleBackColor = true; // + // groupBox_MP3 + // + this.groupBox_MP3.Controls.Add(this.comboBox_MP3_bps); + this.groupBox_MP3.Controls.Add(this.label11); + resources.ApplyResources(this.groupBox_MP3, "groupBox_MP3"); + this.groupBox_MP3.Name = "groupBox_MP3"; + this.groupBox_MP3.TabStop = false; + // + // label11 + // + resources.ApplyResources(this.label11, "label11"); + this.label11.Name = "label11"; + // + // groupBox_Ogg + // + this.groupBox_Ogg.Controls.Add(this.numericUpDown_Ogg_Q); + this.groupBox_Ogg.Controls.Add(this.label10); + this.groupBox_Ogg.Controls.Add(this.trackBar_Ogg_Q); + resources.ApplyResources(this.groupBox_Ogg, "groupBox_Ogg"); + this.groupBox_Ogg.Name = "groupBox_Ogg"; + this.groupBox_Ogg.TabStop = false; + // + // numericUpDown_Ogg_Q + // + this.numericUpDown_Ogg_Q.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Ogg_Q, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + resources.ApplyResources(this.numericUpDown_Ogg_Q, "numericUpDown_Ogg_Q"); + this.numericUpDown_Ogg_Q.Maximum = new decimal(new int[] { + 10, + 0, + 0, + 0}); + this.numericUpDown_Ogg_Q.Minimum = new decimal(new int[] { + 1, + 0, + 0, + -2147483648}); + this.numericUpDown_Ogg_Q.Name = "numericUpDown_Ogg_Q"; + this.numericUpDown_Ogg_Q.Value = new decimal(new int[] { + 10, + 0, + 0, + 0}); + // + // bindingSource_Ogg_Q + // + this.bindingSource_Ogg_Q.DataSource = typeof(DTX2WAV.Main.VolumeSlider); + // + // label10 + // + resources.ApplyResources(this.label10, "label10"); + this.label10.Name = "label10"; + // + // trackBar_Ogg_Q + // + resources.ApplyResources(this.trackBar_Ogg_Q, "trackBar_Ogg_Q"); + this.trackBar_Ogg_Q.DataBindings.Add(new System.Windows.Forms.Binding("Value", this.bindingSource_Ogg_Q, "Value", true, System.Windows.Forms.DataSourceUpdateMode.OnPropertyChanged)); + this.trackBar_Ogg_Q.LargeChange = 1; + this.trackBar_Ogg_Q.Minimum = -1; + this.trackBar_Ogg_Q.Name = "trackBar_Ogg_Q"; + this.trackBar_Ogg_Q.Value = 10; + // + // comboBox_MP3_bps + // + this.comboBox_MP3_bps.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; + this.comboBox_MP3_bps.FormattingEnabled = true; + this.comboBox_MP3_bps.Items.AddRange(new object[] { + resources.GetString("comboBox_MP3_bps.Items"), + resources.GetString("comboBox_MP3_bps.Items1"), + resources.GetString("comboBox_MP3_bps.Items2"), + resources.GetString("comboBox_MP3_bps.Items3"), + resources.GetString("comboBox_MP3_bps.Items4"), + resources.GetString("comboBox_MP3_bps.Items5"), + resources.GetString("comboBox_MP3_bps.Items6"), + resources.GetString("comboBox_MP3_bps.Items7"), + resources.GetString("comboBox_MP3_bps.Items8"), + resources.GetString("comboBox_MP3_bps.Items9")}); + resources.ApplyResources(this.comboBox_MP3_bps, "comboBox_MP3_bps"); + this.comboBox_MP3_bps.Name = "comboBox_MP3_bps"; + // // Main // resources.ApplyResources(this, "$this"); @@ -503,12 +599,12 @@ this.Shown += new System.EventHandler(this.Main_Shown); this.menuStrip1.ResumeLayout(false); this.menuStrip1.PerformLayout(); - this.groupBox1.ResumeLayout(false); - this.groupBox1.PerformLayout(); + this.groupBox_recfiles.ResumeLayout(false); + this.groupBox_recfiles.PerformLayout(); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); - this.groupBox2.ResumeLayout(false); - this.groupBox2.PerformLayout(); + this.groupBox_volumes.ResumeLayout(false); + this.groupBox_volumes.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_Master)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource_Master)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar_Master)).EndInit(); @@ -527,6 +623,14 @@ ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_BGM)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.bindingSource_BGM)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.trackBar_BGM)).EndInit(); + this.tabPage2.ResumeLayout(false); + this.groupBox_MP3.ResumeLayout(false); + this.groupBox_MP3.PerformLayout(); + this.groupBox_Ogg.ResumeLayout(false); + this.groupBox_Ogg.PerformLayout(); + ((System.ComponentModel.ISupportInitialize)(this.numericUpDown_Ogg_Q)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.bindingSource_Ogg_Q)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.trackBar_Ogg_Q)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -541,7 +645,7 @@ private System.Windows.Forms.StatusStrip statusStrip1; private System.Windows.Forms.OpenFileDialog openFileDialog1; private System.Windows.Forms.Label label1; - private System.Windows.Forms.GroupBox groupBox1; + private System.Windows.Forms.GroupBox groupBox_recfiles; private System.Windows.Forms.ComboBox comboBox_AudioFormat; private System.Windows.Forms.Label label3; private System.Windows.Forms.Button button_BrowseAudio; @@ -553,7 +657,7 @@ private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; private System.Windows.Forms.ToolStripMenuItem exitToolStripMenuItem; - private System.Windows.Forms.GroupBox groupBox2; + private System.Windows.Forms.GroupBox groupBox_volumes; private System.Windows.Forms.CheckBox checkBox_MonitorSound; private System.Windows.Forms.NumericUpDown numericUpDown_Master; private System.Windows.Forms.Label label9; @@ -583,6 +687,14 @@ private System.Windows.Forms.BindingSource bindingSource_Guitar; private System.Windows.Forms.BindingSource bindingSource_Bass; private System.Windows.Forms.BindingSource bindingSource_Master; + private System.Windows.Forms.GroupBox groupBox_MP3; + private System.Windows.Forms.Label label11; + private System.Windows.Forms.GroupBox groupBox_Ogg; + private System.Windows.Forms.NumericUpDown numericUpDown_Ogg_Q; + private System.Windows.Forms.Label label10; + private System.Windows.Forms.TrackBar trackBar_Ogg_Q; + private System.Windows.Forms.BindingSource bindingSource_Ogg_Q; + private System.Windows.Forms.ComboBox comboBox_MP3_bps; } } diff --git a/DTX2WAV/Form1.cs b/DTX2WAV/Form1.cs index d245f8ff..18e7d271 100644 --- a/DTX2WAV/Form1.cs +++ b/DTX2WAV/Form1.cs @@ -17,6 +17,7 @@ namespace DTX2WAV { Form_Recording formRecording; Process p_DTXMania = null; + bool bOpenedEncodingSettingTab = false; public Main() { @@ -27,6 +28,7 @@ namespace DTX2WAV bindingSource_Guitar.DataSource = new VolumeSlider(); bindingSource_Bass.DataSource = new VolumeSlider(); bindingSource_Master.DataSource = new VolumeSlider(); + bindingSource_Ogg_Q.DataSource = new VolumeSlider(); } /// @@ -66,14 +68,17 @@ namespace DTX2WAV #endregion #region [ 復元した設定値を、Formに反映する ] - numericUpDown_BGM.Value = Properties.Settings.Default.nVol_BGM; - numericUpDown_SE.Value = Properties.Settings.Default.nVol_SE; - numericUpDown_Drums.Value = Properties.Settings.Default.nVol_Drums; - numericUpDown_Guitar.Value = Properties.Settings.Default.nVol_Guitar; - numericUpDown_Bass.Value = Properties.Settings.Default.nVol_Bass; - numericUpDown_Master.Value = Properties.Settings.Default.nVol_Master; - checkBox_MonitorSound.Checked = Properties.Settings.Default.bMonitorSound; + numericUpDown_BGM.Value = Properties.Settings.Default.nVol_BGM; + numericUpDown_SE.Value = Properties.Settings.Default.nVol_SE; + numericUpDown_Drums.Value = Properties.Settings.Default.nVol_Drums; + numericUpDown_Guitar.Value = Properties.Settings.Default.nVol_Guitar; + 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; + + numericUpDown_Ogg_Q.Value = Properties.Settings.Default.nOgg_Q; // この設定は後でもう一度実施する。tabControl1_SelectedIndexChanged()へ。 + comboBox_MP3_bps.SelectedIndex = Properties.Settings.Default.nMP3_bps; #endregion } @@ -181,12 +186,40 @@ namespace DTX2WAV //アプリ名と引数の情報を設定 p_DTXMania.StartInfo.FileName = "DTXManiaGR.exe"; - p_DTXMania.StartInfo.Arguments = $"-E{comboBox_AudioFormat.Text.ToUpper()},48000,192,"; + p_DTXMania.StartInfo.Arguments = $"-E{comboBox_AudioFormat.Text.ToUpper()},"; + + switch (comboBox_AudioFormat.Text.ToUpper()) + { + case "WAV": + p_DTXMania.StartInfo.Arguments += "48000,192,"; // freqとbitrate、DTXMania側ではいずれも無視される + break; + case "OGG": + p_DTXMania.StartInfo.Arguments += $"48000,{numericUpDown_Ogg_Q.Value},"; + break; + case "MP3": + p_DTXMania.StartInfo.Arguments += $"48000,{comboBox_MP3_bps.Text},"; + break; + default: + p_DTXMania.StartInfo.Arguments += "48000,192,"; + break; + } + p_DTXMania.StartInfo.Arguments += $"{numericUpDown_BGM.Value},{numericUpDown_SE.Value},{numericUpDown_Drums.Value},{numericUpDown_Guitar.Value},{numericUpDown_Bass.Value},{numericUpDown_Master.Value},"; p_DTXMania.StartInfo.Arguments += $"\"{textBox_BrowseAudio.Text}\",\"{textBox_BrowseDTX.Text}\""; //起動する - p_DTXMania.Start(); + try + { + p_DTXMania.Start(); + } + catch (Exception) + { + MessageBox.Show("DTXMania本体の起動に失敗しました。録音できません。", "Failed launching DTXMania", MessageBoxButtons.OK, MessageBoxIcon.Error); + p_DTXMania.Close(); + p_DTXMania.Dispose(); + p_DTXMania = null; + return; + } #endregion //モーダルで変換中ダイアログを表示して、処理をいったん止める(キャンセル or 正常終了イベント待ち) @@ -237,6 +270,7 @@ namespace DTX2WAV } } + p_DTXMania.Close(); p_DTXMania.Dispose(); p_DTXMania = null; } @@ -328,7 +362,9 @@ 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; + Properties.Settings.Default.nAudioFormat = comboBox_AudioFormat.SelectedIndex; + Properties.Settings.Default.nOgg_Q = (int)numericUpDown_Ogg_Q.Value; + Properties.Settings.Default.nMP3_bps = comboBox_MP3_bps.SelectedIndex; #endregion Properties.Settings.Default.Save(); @@ -358,6 +394,21 @@ namespace DTX2WAV } base.WndProc(ref m); } + + + + private void tabControl1_SelectedIndexChanged(object sender, EventArgs e) + { + // Encoding Settingsタブにある、numericUpDownかTrackbarの値は、 + // Form_Shown()で初期化した値が、 + // タブの初回オープン時にゼロクリアされてしまう模様。 + // そのため、この値だけは、タブの初回オープン時に初期化する。 + if (tabControl1.SelectedIndex == 1 && bOpenedEncodingSettingTab == false) + { + bOpenedEncodingSettingTab = true; + numericUpDown_Ogg_Q.Value = Properties.Settings.Default.nOgg_Q; + } + } } } diff --git a/DTX2WAV/Form1.resx b/DTX2WAV/Form1.resx index 606a8210..807368ee 100644 --- a/DTX2WAV/Form1.resx +++ b/DTX2WAV/Form1.resx @@ -118,14 +118,14 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - 17, 17 + 191, 17 0, 0 - 681, 24 + 655, 24 @@ -153,7 +153,7 @@ &File - 93, 22 + 152, 22 E&xit @@ -171,13 +171,13 @@ &Help - 132, 17 + 306, 17 - 0, 513 + 0, 497 - 681, 22 + 655, 22 1 @@ -198,7 +198,7 @@ 1 - 248, 17 + 422, 17 True @@ -211,13 +211,13 @@ 20, 26 - 120, 12 + 142, 12 2 - 変換するDTXファイル(&D) + 録音元のDTXファイルパス(&D) label1 @@ -226,118 +226,13 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 7 - - comboBox_AudioFormat - - - System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 0 - - - label3 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 1 - - - button_BrowseAudio - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 2 - - - textBox_BrowseAudio - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 3 - - - label2 - - - System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 4 - - - button_browseDTX - - - System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 5 - - - textBox_BrowseDTX - - - System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - groupBox1 - - - 6 - - - 6, 6 - - - 633, 138 - - - 3 - - - 変換ファイルの指定 - - - groupBox1 - - - System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - tabPage1 - - - 3 + + Left, Right WAV @@ -355,7 +250,7 @@ 121, 20 - 0 + 5 comboBox_AudioFormat @@ -364,7 +259,7 @@ System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 0 @@ -379,13 +274,13 @@ 20, 103 - 134, 12 + 104, 12 9 - 出力するオーディオ形式(&M) + 出力ファイル形式(&M) label3 @@ -394,7 +289,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 1 @@ -409,7 +304,7 @@ 75, 23 - 10 + 4 参照 @@ -421,7 +316,7 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 2 @@ -433,7 +328,7 @@ 342, 19 - 7 + 3 textBox_BrowseAudio @@ -442,7 +337,7 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 3 @@ -463,7 +358,7 @@ 6 - 出力するオーディオファイル(&A) + 出力オーディオファイルパス(&A) label2 @@ -472,7 +367,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 4 @@ -487,7 +382,7 @@ 75, 23 - 11 + 2 参照 @@ -499,7 +394,7 @@ System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 5 @@ -511,7 +406,7 @@ 342, 19 - 4 + 1 textBox_BrowseDTX @@ -520,11 +415,38 @@ System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox1 + groupBox_recfiles 6 + + 6, 6 + + + 633, 138 + + + 1 + + + 録音ファイルの指定 + + + groupBox_recfiles + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage1 + + + 3 + + + Bottom, Right + NoControl @@ -535,10 +457,10 @@ 75, 23 - 6 + 0 - Cancel + 終了 button_Cancel @@ -552,6 +474,9 @@ 0 + + Bottom, Right + NoControl @@ -562,7 +487,7 @@ 75, 23 - 5 + 3 録音 @@ -579,6 +504,9 @@ 1 + + Left, Right + True @@ -607,13 +535,13 @@ System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 0 - 177, 56 + 346, 56 525, 186 @@ -622,7 +550,7 @@ 75, 19 - 17 + 12 numericUpDown_Master @@ -631,7 +559,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 1 @@ -661,14 +589,11 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 2 - - 177, 56 - False @@ -682,7 +607,7 @@ 330, 22 - 15 + 11 trackBar_Master @@ -691,13 +616,13 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 3 - 17, 56 + 186, 56 525, 133 @@ -706,7 +631,7 @@ 75, 19 - 14 + 10 numericUpDown_Bass @@ -715,7 +640,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 4 @@ -745,7 +670,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 5 @@ -763,7 +688,7 @@ 330, 22 - 12 + 9 trackBar_Bass @@ -772,13 +697,13 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 6 - 1069, 17 + 17, 56 525, 105 @@ -787,7 +712,7 @@ 75, 19 - 11 + 8 numericUpDown_Guitar @@ -796,7 +721,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 7 @@ -826,7 +751,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 8 @@ -844,7 +769,7 @@ 330, 22 - 9 + 7 trackBar_Guitar @@ -853,13 +778,13 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 9 - 932, 17 + 1106, 17 525, 77 @@ -868,7 +793,7 @@ 75, 19 - 8 + 6 numericUpDown_Drums @@ -877,7 +802,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 10 @@ -907,7 +832,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 11 @@ -925,7 +850,7 @@ 330, 22 - 6 + 5 trackBar_Drums @@ -934,13 +859,13 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 12 - 783, 17 + 957, 17 525, 49 @@ -949,7 +874,7 @@ 75, 19 - 5 + 4 numericUpDown_SE @@ -958,7 +883,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 13 @@ -988,7 +913,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 14 @@ -1015,13 +940,13 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 15 - 621, 17 + 795, 17 525, 21 @@ -1039,7 +964,7 @@ System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 16 @@ -1069,7 +994,7 @@ System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 17 @@ -1087,7 +1012,7 @@ 330, 22 - 0 + 1 trackBar_BGM @@ -1096,33 +1021,33 @@ System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - groupBox2 + groupBox_volumes 18 - + 6, 150 - + 633, 254 - - 4 + + 2 - + Volume設定 - - groupBox2 + + groupBox_volumes - + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - + tabPage1 - + 2 @@ -1132,7 +1057,7 @@ 3, 3, 3, 3 - 656, 448 + 647, 447 0 @@ -1152,6 +1077,30 @@ 0 + + groupBox_MP3 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 0 + + + groupBox_Ogg + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 1 + 4, 22 @@ -1159,13 +1108,13 @@ 3, 3, 3, 3 - 656, 448 + 647, 447 1 - Encoding + Encoder Settings tabPage2 @@ -1179,14 +1128,17 @@ 1 + + Fill + - 12, 27 + 0, 24 - 664, 474 + 655, 473 - 4 + 0 tabControl1 @@ -1200,27 +1152,279 @@ 0 - - 17, 56 - - - 1069, 17 - - - 932, 17 - - - 783, 17 + + comboBox_MP3_bps + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_MP3 + + + 0 + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_MP3 + + + 1 + + + 6, 79 + + + 644, 78 + + + 1 + + + MP3 + + + groupBox_MP3 + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 0 + + + True + + + NoControl + + + 18, 27 + + + 42, 12 + + + 3 + + + Bitrate: + + + label11 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_MP3 + + + 1 + + + numericUpDown_Ogg_Q + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 0 + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 1 + + + trackBar_Ogg_Q + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 2 + + + 6, 6 + + + 644, 67 + + + 0 + + + Ogg + + + groupBox_Ogg + + + System.Windows.Forms.GroupBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + tabPage2 + + + 1 + + + 17, 17 - - 621, 17 + + 561, 25 + + + 57, 19 + + + 1 + + + numericUpDown_Ogg_Q + + + System.Windows.Forms.NumericUpDown, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 0 + + + 17, 17 + + True + + + 18, 25 + + + 83, 12 + + + 1 + + + Quality Setting: + + + label10 + + + System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 1 + + + False + + + 117, 18 + + + 426, 26 + + + 0 + + + trackBar_Ogg_Q + + + System.Windows.Forms.TrackBar, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_Ogg + + + 2 + - 388, 17 + 562, 17 - 524, 17 + 698, 17 + + 64 + + + 80 + + + 96 + + + 112 + + + 128 + + + 160 + + + 192 + + + 224 + + + 256 + + + 320 + + + 117, 24 + + + 121, 20 + + + 0 + + + comboBox_MP3_bps + + + System.Windows.Forms.ComboBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + groupBox_MP3 + + + 0 + True @@ -1228,7 +1432,7 @@ 6, 12 - 681, 535 + 655, 519 DTX2WAV @@ -1299,6 +1503,12 @@ System.Windows.Forms.BindingSource, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + bindingSource_Ogg_Q + + + System.Windows.Forms.BindingSource, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + saveFileDialog1 diff --git a/DTX2WAV/Form_Recording.resx b/DTX2WAV/Form_Recording.resx index 242104f4..7d979eea 100644 --- a/DTX2WAV/Form_Recording.resx +++ b/DTX2WAV/Form_Recording.resx @@ -198,13 +198,13 @@ 108, 57 - 91, 12 + 160, 12 3 - DTXManiaの起動 + DTXManiaのバックグラウンド起動 label_boot @@ -487,7 +487,7 @@ CenterParent - DTX2WAV [Recording...] + DTX2WAV [録音中...] Form_Recording diff --git a/DTX2WAV/Properties/AssemblyInfo.cs b/DTX2WAV/Properties/AssemblyInfo.cs index e851d6ae..2783dfce 100644 --- a/DTX2WAV/Properties/AssemblyInfo.cs +++ b/DTX2WAV/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます // 既定値にすることができます: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.0.0.0")] -[assembly: AssemblyFileVersion("6.0.0.0")] +[assembly: AssemblyVersion("7.0.0.0")] +[assembly: AssemblyFileVersion("7.0.0.0")] diff --git a/DTX2WAV/Properties/Settings.Designer.cs b/DTX2WAV/Properties/Settings.Designer.cs index 6548bfb4..8696ae46 100644 --- a/DTX2WAV/Properties/Settings.Designer.cs +++ b/DTX2WAV/Properties/Settings.Designer.cs @@ -97,7 +97,7 @@ namespace DTX2WAV.Properties { [global::System.Configuration.UserScopedSettingAttribute()] [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Configuration.DefaultSettingValueAttribute("0")] + [global::System.Configuration.DefaultSettingValueAttribute("100")] public int nVol_Master { get { return ((int)(this["nVol_Master"])); @@ -142,5 +142,29 @@ namespace DTX2WAV.Properties { this["nAudioFormat"] = value; } } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("10")] + public int nOgg_Q { + get { + return ((int)(this["nOgg_Q"])); + } + set { + this["nOgg_Q"] = value; + } + } + + [global::System.Configuration.UserScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.DefaultSettingValueAttribute("4")] + public int nMP3_bps { + get { + return ((int)(this["nMP3_bps"])); + } + set { + this["nMP3_bps"] = value; + } + } } } diff --git a/DTX2WAV/Properties/Settings.settings b/DTX2WAV/Properties/Settings.settings index 9ab513b9..4dc4316f 100644 --- a/DTX2WAV/Properties/Settings.settings +++ b/DTX2WAV/Properties/Settings.settings @@ -21,7 +21,7 @@ 100 - 0 + 100 True @@ -32,5 +32,11 @@ 0 + + 10 + + + 4 + \ No newline at end of file diff --git a/DTXMania/コード/ステージ/04.コンフィグ/CActConfigList.cs b/DTXMania/コード/ステージ/04.コンフィグ/CActConfigList.cs index ec3536d6..64ef6dc6 100644 --- a/DTXMania/コード/ステージ/04.コンフィグ/CActConfigList.cs +++ b/DTXMania/コード/ステージ/04.コンフィグ/CActConfigList.cs @@ -6,6 +6,7 @@ using System.Drawing; using System.Threading; using SharpDX; using FDK; +using System.IO; using Color = System.Drawing.Color; using Point = System.Drawing.Point; @@ -622,7 +623,11 @@ namespace DTXMania { this.list項目リスト = new List(); this.eメニュー種別 = Eメニュー種別.Unknown; - this.prvFont = new CPrivateFastFont(CSkin.Path(@"Graphics\fonts\mplus-1p-heavy.ttf"), (int)(18 * Scale.Y)); + + CResources cr = CDTXMania.Instance.Resources; + string fontname = cr.Explanation("strCfgConfigurationFontFileName"); + string path = Path.Combine(@"Graphics\fonts", fontname); + this.prvFont = new CPrivateFastFont(CSkin.Path(path), (int)(18 * Scale.Y)); this.b要素値にフォーカス中 = false; this.n目標のスクロールカウンタ = 0; this.n現在のスクロールカウンタ = 0; @@ -635,7 +640,7 @@ namespace DTXMania EDrumsMenu = new STDGBSValue(); ReturnToMenu = new STDGBSValue(); - CResources cr = CDTXMania.Instance.Resources; + //CResources cr = CDTXMania.Instance.Resources; for ( EPart i = EPart.Drums; i <= EPart.System; ++i ) { DisplayMenu[i] = new COptionLabel( "strCfgDisplayOption" ); diff --git a/DTXMania/コード/全体/CDTXMania.cs b/DTXMania/コード/全体/CDTXMania.cs index 7690602c..da4d0475 100644 --- a/DTXMania/コード/全体/CDTXMania.cs +++ b/DTXMania/コード/全体/CDTXMania.cs @@ -363,6 +363,7 @@ namespace DTXMania FDK.CSound管理.strRecordInputDTXfilename = DTX2WAVmode.dtxfilename; FDK.CSound管理.strRecordOutFilename = DTX2WAVmode.outfilename; FDK.CSound管理.strRecordFileType = DTX2WAVmode.Format.ToString(); + FDK.CSound管理.nBitrate = DTX2WAVmode.bitrate; for (int i = 0; i < (int)FDK.CSound.EInstType.Unknown; i++) { FDK.CSound管理.nMixerVolume[ i ] = DTX2WAVmode.nMixerVolume[ i ]; @@ -381,19 +382,19 @@ namespace DTXMania // エンコーダーのパス設定 (=DLLフォルダ) FDK.CSound管理.strEncoderPath = Path.Combine(strEXEのあるフォルダ, "DLL"); - CDTXMania.Instance.ConfigIni.nSoundDeviceType.Value = ESoundDeviceTypeForConfig.WASAPI_Exclusive; - CDTXMania.Instance.ConfigIni.bEventDrivenWASAPI.Value = false; + CDTXMania.instance.ConfigIni.nSoundDeviceType.Value = ESoundDeviceTypeForConfig.WASAPI_Exclusive; + CDTXMania.instance.ConfigIni.bEventDrivenWASAPI.Value = false; - CDTXMania.Instance.ConfigIni.bVSyncWait.Value = false; - CDTXMania.Instance.ConfigIni.bTimeStretch.Value = false; - CDTXMania.Instance.ConfigIni.eActiveInst.Value = EActiveInstrument.Both; + CDTXMania.instance.ConfigIni.bVSyncWait.Value = false; + CDTXMania.instance.ConfigIni.bTimeStretch.Value = false; + CDTXMania.instance.ConfigIni.eActiveInst.Value = EActiveInstrument.Both; - CDTXMania.Instance.ConfigIni.bFullScreen.Value = false; - CDTXMania.Instance.ConfigIni.rcWindow_backup = CDTXMania.Instance.ConfigIni.rcWindow; - CDTXMania.Instance.ConfigIni.rcWindow.W = CDTXMania.Instance.ConfigIni.rcViewerWindow.W; - CDTXMania.Instance.ConfigIni.rcWindow.H = CDTXMania.Instance.ConfigIni.rcViewerWindow.H; - CDTXMania.Instance.ConfigIni.rcWindow.X = CDTXMania.Instance.ConfigIni.rcViewerWindow.X; - CDTXMania.Instance.ConfigIni.rcWindow.Y = CDTXMania.Instance.ConfigIni.rcViewerWindow.Y; + CDTXMania.instance.ConfigIni.bFullScreen.Value = false; + CDTXMania.instance.ConfigIni.rcWindow_backup = CDTXMania.Instance.ConfigIni.rcWindow; + CDTXMania.instance.ConfigIni.rcWindow.W = CDTXMania.Instance.ConfigIni.rcViewerWindow.W; + CDTXMania.instance.ConfigIni.rcWindow.H = CDTXMania.Instance.ConfigIni.rcViewerWindow.H; + CDTXMania.instance.ConfigIni.rcWindow.X = CDTXMania.Instance.ConfigIni.rcViewerWindow.X; + CDTXMania.instance.ConfigIni.rcWindow.Y = CDTXMania.Instance.ConfigIni.rcViewerWindow.Y; //全オート CDTXMania.instance.ConfigIni.bAutoPlay.LC.Value = true; @@ -479,9 +480,9 @@ namespace DTXMania CDTXMania.instance.ConfigIni.bDrumsHitSound.Value = true; //パート強調オフ - CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Drums.Value = false; - CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Guitar.Value = false; - CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Bass.Value = false; + CDTXMania.instance.ConfigIni.bEmphasizePlaySound.Drums.Value = false; + CDTXMania.instance.ConfigIni.bEmphasizePlaySound.Guitar.Value = false; + CDTXMania.instance.ConfigIni.bEmphasizePlaySound.Bass.Value = false; // パッド入力等、基本操作の無効化 (ESCを除く) //CDTXMania.Instance.ConfigIni.KeyAssign[][]; diff --git a/FDK/コード/03.サウンド/CSound.cs b/FDK/コード/03.サウンド/CSound.cs index 7ad1234d..5e14b27b 100644 --- a/FDK/コード/03.サウンド/CSound.cs +++ b/FDK/コード/03.サウンド/CSound.cs @@ -216,6 +216,17 @@ namespace FDK /// public static string strEncoderPath; + /// + /// 録音機能で使う、サンプリング周波数 + /// + public static int nFreq; + + /// + /// 録音機能で使う、ビットレート(OGG時は、Q値(-1~10) + /// + public static int nBitrate; + + #endregion diff --git a/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs b/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs index cdb55aaa..362158b4 100644 --- a/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs +++ b/FDK/コード/03.サウンド/CSoundDeviceWASAPI.cs @@ -458,13 +458,7 @@ 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++) { @@ -548,7 +542,7 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s, var e = new EncoderOGG(this.hMixer_DeviceOut); e.EncoderDirectory = strEncoderPath; e.OGG_UseQualityMode = true; - e.OGG_Quality = 8.0f; + e.OGG_Quality = (float)CSound管理.nBitrate; //e.OGG_Bitrate = 128; //e.OGG_MinBitrate = 0; //e.OGG_MaxBitrate = 0; @@ -561,7 +555,7 @@ Trace.TraceInformation("WASAPI Device #{0}: {1}: IsDefault={2}, defPeriod={3}s, var e = new EncoderLAME(this.hMixer_DeviceOut); e.EncoderDirectory = strEncoderPath; e.LAME_UseVBR = false; - e.LAME_Bitrate = 192; + e.LAME_Bitrate = CSound管理.nBitrate; encoder = e; } break; -- 2.11.0