<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
//
// 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;
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
}
}
break;
- default:
+ default: // DTXMania本体を強制終了した、など
break;
}
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();
<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&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>&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>&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>&Help</value>
- </data>
<data name="menuStrip1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name=">>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>&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&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>&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>&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=">>label1.ZOrder" xml:space="preserve">
<value>7</value>
</data>
+ <data name=">>comboBox_AudioFormat.Name" xml:space="preserve">
+ <value>comboBox_AudioFormat</value>
+ </data>
+ <data name=">>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=">>comboBox_AudioFormat.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>comboBox_AudioFormat.ZOrder" xml:space="preserve">
+ <value>0</value>
+ </data>
+ <data name=">>label3.Name" xml:space="preserve">
+ <value>label3</value>
+ </data>
+ <data name=">>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=">>label3.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>label3.ZOrder" xml:space="preserve">
+ <value>1</value>
+ </data>
+ <data name=">>button_BrowseAudio.Name" xml:space="preserve">
+ <value>button_BrowseAudio</value>
+ </data>
+ <data name=">>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=">>button_BrowseAudio.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>button_BrowseAudio.ZOrder" xml:space="preserve">
+ <value>2</value>
+ </data>
+ <data name=">>textBox_BrowseAudio.Name" xml:space="preserve">
+ <value>textBox_BrowseAudio</value>
+ </data>
+ <data name=">>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=">>textBox_BrowseAudio.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>textBox_BrowseAudio.ZOrder" xml:space="preserve">
+ <value>3</value>
+ </data>
+ <data name=">>label2.Name" xml:space="preserve">
+ <value>label2</value>
+ </data>
+ <data name=">>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=">>label2.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>label2.ZOrder" xml:space="preserve">
+ <value>4</value>
+ </data>
+ <data name=">>button_browseDTX.Name" xml:space="preserve">
+ <value>button_browseDTX</value>
+ </data>
+ <data name=">>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=">>button_browseDTX.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>button_browseDTX.ZOrder" xml:space="preserve">
+ <value>5</value>
+ </data>
+ <data name=">>textBox_BrowseDTX.Name" xml:space="preserve">
+ <value>textBox_BrowseDTX</value>
+ </data>
+ <data name=">>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=">>textBox_BrowseDTX.Parent" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>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=">>groupBox1.Name" xml:space="preserve">
+ <value>groupBox1</value>
+ </data>
+ <data name=">>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=">>groupBox1.Parent" xml:space="preserve">
+ <value>tabPage1</value>
+ </data>
+ <data name=">>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=">>comboBox_AudioFormat.Name" xml:space="preserve">
<value>comboBox_AudioFormat</value>
</data>
<data name=">>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=">>groupBox1.Name" xml:space="preserve">
- <value>groupBox1</value>
- </data>
- <data name=">>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=">>groupBox1.Parent" xml:space="preserve">
- <value>tabPage1</value>
- </data>
- <data name=">>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=">>checkBox_MonitorSound.Name" xml:space="preserve">
<value>checkBox_MonitorSound</value>
</data>
<data name=">>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=">>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>
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);
// すべての値を指定するか、次を使用してビルド番号とリビジョン番号を既定に設定できます
// 既定値にすることができます:
// [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")]
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;
+ }
+ }
}
}
<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
nChipDisplayTimeMs.Initialize("", "", 0);
nChipFadeoutTimeMs.Initialize("", "", 0);
- nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 101);
+ nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 201);
nPolyphonicSounds.Initialize( "strCfgSysPolyphonicSounds", 1, 11 );
// dgb
// 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フェードアウト開始();
}
}
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)
{
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;
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;
CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Guitar.Value = false;
CDTXMania.Instance.ConfigIni.bEmphasizePlaySound.Bass.Value = false;
+ // パッド入力等、基本操作の無効化 (ESCを除く)
+ //CDTXMania.Instance.ConfigIni.KeyAssign[][];
+
#endregion
}
else // 通常のコンパクトモード
if (DTX2WAVmode.Enabled)
{
- this.Window.WindowState = FormWindowState.Minimized; //DTX2WAVモード時は自動的に最小化したいが、まだうまくいかない
+ this.Window.WindowState = FormWindowState.Minimized; //DTX2WAVモード時は自動的に最小化
}
DTX = null;
DTX.t全チップの再生停止();
DTX.On非活性化();
r現在のステージ.On非活性化();
+ if (DTX2WAVmode.Enabled)
+ {
+ Environment.Exit(0);
+ }
if (bコンパクトモード)
{
base.Window.Close();
/// <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
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:
protected set;
}
+ public string strRecordFileType = null;
+
// CSoundTimer 用に公開しているプロパティ
public long n経過時間ms
/// <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 )
{
// 初期化。
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++)
{
// 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)
// 録音設定(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);
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;