{\r
// プロパティ\r
#region [ properties ]\r
- public static readonly string VERSION = "098(131101)";\r
+ public static readonly string VERSION = "099g(191022)";\r
public static readonly string SLIMDXDLL = "c_net20x86_Jun2010";\r
public static readonly string D3DXDLL = "d3dx9_43.dll"; // June 2010\r
//public static readonly string D3DXDLL = "d3dx9_42.dll"; // February 2010\r
protected override void Initialize()\r
{\r
// new GCBeep();\r
- sw.Start();\r
- swlist = new List<double>( 8192 );\r
- if( this.listトップレベルActivities != null )\r
+ //sw.Start();\r
+ //swlist1 = new List<int>( 8192 );\r
+ //swlist2 = new List<int>( 8192 );\r
+ //swlist3 = new List<int>( 8192 );\r
+ //swlist4 = new List<int>( 8192 );\r
+ //swlist5 = new List<int>( 8192 );\r
+ if ( this.listトップレベルActivities != null )\r
{\r
foreach( CActivity activity in this.listトップレベルActivities )\r
activity.OnManagedリソースの作成();\r
}\r
protected override void Draw( GameTime gameTime )\r
{\r
+ if (Sound管理 == null)\r
+ {\r
+ return;\r
+ }\r
Sound管理.t再生中の処理をする();\r
\r
if( Timer != null )\r
case CStage.Eステージ.演奏:\r
#region [ *** ]\r
//-----------------------------\r
-\r
- double n = (double)sw.ElapsedTicks / (double)Stopwatch.Frequency;\r
- swlist.Add(n);\r
+ //long n1 = FDK.CSound管理.rc演奏用タイマ.nシステム時刻ms;\r
+ //long n2 = FDK.CSound管理.SoundDevice.n経過時間ms;\r
+ //long n3 = FDK.CSound管理.SoundDevice.tmシステムタイマ.nシステム時刻ms;\r
+ //long n4 = FDK.CSound管理.rc演奏用タイマ.n現在時刻;\r
+ //long n5 = FDK.CSound管理.SoundDevice.n経過時間を更新したシステム時刻ms;\r
+\r
+ //swlist1.Add( Convert.ToInt32(n1) );\r
+ //swlist2.Add( Convert.ToInt32(n2) );\r
+ //swlist3.Add( Convert.ToInt32( n3 ) );\r
+ //swlist4.Add( Convert.ToInt32( n4 ) );\r
+ //swlist5.Add( Convert.ToInt32( n5 ) );\r
\r
#region [ DTXVモード中にDTXCreatorから指示を受けた場合の処理 ]\r
if ( DTXVmode.Enabled && DTXVmode.Refreshed )\r
this.previewSound.Dispose();\r
this.previewSound = null;\r
}\r
+ //{\r
+ // int lastd = 0;\r
+ // int f = 0;\r
+ // for ( int i = 0; i < swlist1.Count; i++ )\r
+ // {\r
+ // int d1 = swlist1[ i ];\r
+ // int d2 = swlist2[ i ];\r
+ // int d3 = swlist3[ i ];\r
+ // int d4 = swlist4[ i ];\r
+ // int d5 = swlist5[ i ];\r
+\r
+ // int dif = d1 - lastd;\r
+ // string s = "";\r
+ // if ( 16 <= dif && dif <= 17 )\r
+ // {\r
+ // }\r
+ // else\r
+ // {\r
+ // s = "★";\r
+ // }\r
+ // Trace.TraceInformation( "frame {0:D4}: {1:D3} ( {2:D3}, {3:D3} - {7:D3}, {4:D3} ) {5}, n現在時刻={6}", f, dif, d1, d2, d3, s, d4, d5 );\r
+ // lastd = d1;\r
+ // f++;\r
+ // }\r
+ // swlist1.Clear();\r
+ // swlist2.Clear();\r
+ // swlist3.Clear();\r
+ // swlist4.Clear();\r
+ // swlist5.Clear();\r
+\r
+ //}\r
}\r
else if ( DTXVmode.Command == CDTXVmode.ECommand.Play )\r
{\r
//-----------------------------\r
scoreIni = this.tScoreIniへBGMAdjustとHistoryとPlayCountを更新( "Play canceled" );\r
\r
- double lastd = 0f;\r
- int f = 0;\r
- foreach ( double d in swlist )\r
- {\r
- double dif = d - lastd;\r
- string s = "";\r
- if ( 0.016 < dif && dif < 0.017 )\r
- {\r
- }\r
- else\r
- {\r
- s = "★";\r
- }\r
- //Trace.TraceInformation( "frame " + f + ": " + d + " (" + dif + ")" + s );\r
- lastd = d;\r
- f++;\r
- }\r
- swlist.Clear();\r
+ //int lastd = 0;\r
+ //int f = 0;\r
+ //for (int i = 0; i < swlist1.Count; i++)\r
+ //{\r
+ // int d1 = swlist1[ i ];\r
+ // int d2 = swlist2[ i ];\r
+ // int d3 = swlist3[ i ];\r
+ // int d4 = swlist4[ i ];\r
+\r
+ // int dif = d1 - lastd;\r
+ // string s = "";\r
+ // if ( 16 <= dif && dif <= 17 )\r
+ // {\r
+ // }\r
+ // else\r
+ // {\r
+ // s = "★";\r
+ // }\r
+ // Trace.TraceInformation( "frame {0:D4}: {1:D3} ( {2:D3}, {3:D3}, {4:D3} ) {5}, n現在時刻={6}", f, dif, d1, d2, d3, s, d4 );\r
+ // lastd = d1;\r
+ // f++;\r
+ //}\r
+ //swlist1.Clear();\r
+ //swlist2.Clear();\r
+ //swlist3.Clear();\r
+ //swlist4.Clear();\r
\r
#region [ プラグイン On演奏キャンセル() の呼び出し ]\r
//---------------------\r
// BEGIN #23629 2010.11.13 from: デバッグ時は Application.ExecutablePath が ($SolutionDir)/bin/x86/Debug/ などになり System/ の読み込みに失敗するので、カレントディレクトリを採用する。(プロジェクトのプロパティ→デバッグ→作業ディレクトリが有効になる)\r
#if DEBUG\r
strEXEのあるフォルダ = Environment.CurrentDirectory + @"\";\r
+ //strEXEのあるフォルダ = Path.GetDirectoryName( Environment.GetCommandLineArgs()[ 0 ] ) + @"\";\r
#else\r
strEXEのあるフォルダ = Path.GetDirectoryName( Application.ExecutablePath ) + @"\"; // #23629 2010.11.9 yyagi: set correct pathname where DTXManiaGR.exe is.\r
#endif\r
{\r
try\r
{\r
- Trace.Listeners.Add( new CTraceLogListener( new StreamWriter( "DTXManiaLog.txt", false, Encoding.GetEncoding( "Shift_JIS" ) ) ) );\r
+ Trace.Listeners.Add( new CTraceLogListener( new StreamWriter( System.IO.Path.Combine( strEXEのあるフォルダ, "DTXManiaLog.txt" ), false, Encoding.GetEncoding( "Shift_JIS" ) ) ) );\r
}\r
catch ( System.UnauthorizedAccessException ) // #24481 2011.2.20 yyagi\r
{\r
#if DEBUG\r
Environment.Exit( -1 );\r
#else\r
- throw new FileNotFoundException( "コンパクトモードで指定されたファイルが見つかりません。DTXManiaを終了します。", strコンパクトモードファイル );\r
+ if ( strコンパクトモードファイル == "" ) // DTXMania未起動状態で、DTXCで再生停止ボタンを押した場合は、何もせず終了\r
+ {\r
+ Environment.Exit( -1 );\r
+ }\r
+ else\r
+ {\r
+ throw new FileNotFoundException( "コンパクトモードで指定されたファイルが見つかりません。DTXManiaを終了します。", strコンパクトモードファイル );\r
+ }\r
#endif\r
}\r
if ( DTXVmode.Enabled )\r
Trace.Indent();\r
try\r
{\r
- Input管理 = new CInput管理( base.Window.Handle );\r
+ bool bUseMIDIIn = !DTXVmode.Enabled;\r
+ Input管理 = new CInput管理( base.Window.Handle, bUseMIDIIn );\r
foreach( IInputDevice device in Input管理.list入力デバイス )\r
{\r
if( ( device.e入力デバイス種別 == E入力デバイス種別.Joystick ) && !ConfigIni.dicJoystick.ContainsValue( device.GUID ) )\r
Trace.TraceInformation( "サウンドデバイスの初期化を行います。" );\r
Trace.Indent();\r
try\r
- { \r
+ {\r
ESoundDeviceType soundDeviceType;\r
switch ( CDTXMania.ConfigIni.nSoundDeviceType )\r
{\r
}\r
Sound管理 = new CSound管理( base.Window.Handle,\r
soundDeviceType,\r
- // CDTXMania.ConfigIni.nWASAPIBufferSizeMs,\r
- 0,\r
+ CDTXMania.ConfigIni.nWASAPIBufferSizeMs,\r
+ // 0,\r
// CDTXMania.ConfigIni.nASIOBufferSizeMs,\r
0,\r
- CDTXMania.ConfigIni.nASIODevice\r
+ CDTXMania.ConfigIni.nASIODevice,\r
+ CDTXMania.ConfigIni.bUseOSTimer\r
);\r
//Sound管理 = FDK.CSound管理.Instance;\r
//Sound管理.t初期化( soundDeviceType, 0, 0, CDTXMania.ConfigIni.nASIODevice, base.Window.Handle );\r
\r
ShowWindowTitleWithSoundType();\r
FDK.CSound管理.bIsTimeStretch = CDTXMania.ConfigIni.bTimeStretch;\r
+ Sound管理.nMasterVolume = CDTXMania.ConfigIni.nMasterVolume;\r
//FDK.CSound管理.bIsMP3DecodeByWindowsCodec = CDTXMania.ConfigIni.bNoMP3Streaming;\r
Trace.TraceInformation( "サウンドデバイスの初期化を完了しました。" );\r
}\r
string[] strDLLs = System.IO.Directory.GetFiles( strプラグインフォルダパス, "*.dll" );\r
foreach( string dllName in strDLLs )\r
{\r
+ if (Path.GetExtension(dllName).ToLower() != ".dll")\r
+ {\r
+ continue;\r
+ }\r
try\r
{\r
// (1-1) dll をアセンブリとして読み込む。\r
\r
//-----------------\r
\r
- Stopwatch sw = new Stopwatch();\r
- List<double> swlist;\r
+ //Stopwatch sw = new Stopwatch();\r
+ //List<int> swlist1, swlist2, swlist3, swlist4, swlist5;\r
\r
#endregion\r
}\r