OSDN Git Service

rev778, 780の対応を、099系にもバックポートした。具体的には以下の対応を実施。
authoryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Wed, 17 Dec 2014 13:51:45 +0000 (13:51 +0000)
committeryyagi <yyagi@16f42ceb-6dc6-49c8-ba94-f2d53467949d>
Wed, 17 Dec 2014 13:51:45 +0000 (13:51 +0000)
#34228 性能改善の一環として、WASAPIのバッファサイズの手動設定機能を復活させた。
#34706 メモリ不足時に演奏したときに強制終了しないよう、いくつかの例外処理を強化した。(DirectSoundのシークエラー処理など)

git-svn-id: http://svn.osdn.jp/svnroot/dtxmania/branches/140113(DTXMania098%20with%2028821%20DTXVmode)@781 16f42ceb-6dc6-49c8-ba94-f2d53467949d

DTXManiaプロジェクト/コード/ステージ/04.コンフィグ/CActConfigList.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏AVI.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/CAct演奏BGA.cs
DTXManiaプロジェクト/コード/ステージ/07.演奏/CStage演奏画面共通.cs
DTXManiaプロジェクト/コード/全体/CConfigIni.cs
DTXManiaプロジェクト/コード/全体/CDTXMania.cs
FDK17プロジェクト/コード/03.サウンド/CSound.cs
FDK17プロジェクト/コード/03.サウンド/CSoundDeviceWASAPI.cs
実行時フォルダ(DTXCreator)/dll/FDK.dll
実行時フォルダ/DTXManiaGR.exe
実行時フォルダ/dll/FDK.dll

index 22d6965..e876cf5 100644 (file)
@@ -294,26 +294,26 @@ namespace DTXMania
                        this.list項目リスト.Add(this.iSystemSoundType);\r
 \r
                        // #24820 2013.1.15 yyagi\r
-                       //this.iSystemWASAPIBufferSizeMs = new CItemInteger( "WASAPIBufSize", 0, 99999, CDTXMania.ConfigIni.nWASAPIBufferSizeMs,\r
-                       //    "WASAPI使用時のバッファサイズ:\n" +\r
-                       //    "0~99999ms を指定可能です。\n" +\r
-                       //    "0を指定すると、OSがバッファの\n" +\r
-                       //    "サイズを自動設定します。\n" +\r
-                       //    "値を小さくするほど発音ラグが\n" +\r
-                       //    "減少しますが、音割れや異常動作を\n" +\r
-                       //    "引き起こす場合があります。\n" +\r
-                       //    "※ 設定はCONFIGURATION画面の\n" +\r
-                       //    " 終了時に有効になります。",\r
-                       //    "Sound buffer size for WASAPI:\n" +\r
-                       //    "You can set from 0 to 99999ms.\n" +\r
-                       //    "Set 0 to use a default sysytem\n" +\r
-                       //    "buffer size.\n" +\r
-                       //    "Smaller value makes smaller lag,\n" +\r
-                       //    "but it may cause sound troubles.\n" +\r
-                       //    "\n" +\r
-                       //    "Note: Exit CONFIGURATION to make\n" +\r
-                       //    "     the setting take effect." );\r
-                       //this.list項目リスト.Add( this.iSystemWASAPIBufferSizeMs );\r
+                       this.iSystemWASAPIBufferSizeMs = new CItemInteger( "WASAPIBufSize", 0, 99999, CDTXMania.ConfigIni.nWASAPIBufferSizeMs,\r
+                               "WASAPI使用時のバッファサイズ:\n" +\r
+                               "0~99999ms を指定可能です。\n" +\r
+                               "0を指定すると、設定可能な最小\n" +\r
+                               "サイズを自動設定します。\n" +\r
+                               "値を小さくするほど発音ラグが\n" +\r
+                               "減少しますが、音割れや異常動作を\n" +\r
+                               "引き起こす場合があります。\n" +\r
+                               "※ 設定はCONFIGURATION画面の\n" +\r
+                               " 終了時に有効になります。",\r
+                               "Sound buffer size for WASAPI:\n" +\r
+                               "You can set from 0 to 99999ms.\n" +\r
+                               "Set 0 to use a minimum buffer\n" +\r
+                               "size.\n" +\r
+                               "Smaller value makes smaller lag,\n" +\r
+                               "but it may cause sound troubles.\n" +\r
+                               "\n" +\r
+                               "Note: Exit CONFIGURATION to make\n" +\r
+                               "     the setting take effect." );\r
+                       this.list項目リスト.Add( this.iSystemWASAPIBufferSizeMs );\r
 \r
                        // #24820 2013.1.17 yyagi\r
                        string[] asiodevs = CEnumerateAllAsioDevices.GetAllASIODevices();\r
@@ -1862,7 +1862,7 @@ namespace DTXMania
                        this.ct三角矢印アニメ = new CCounter();\r
 \r
                        this.iSystemSoundType_initial                   = this.iSystemSoundType.n現在選択されている項目番号;       // CONFIGに入ったときの値を保持しておく\r
-                       // this.iSystemWASAPIBufferSizeMs_initial       = this.iSystemWASAPIBufferSizeMs.n現在の値;                         // CONFIG脱出時にこの値から変更されているようなら\r
+                       this.iSystemWASAPIBufferSizeMs_initial  = this.iSystemWASAPIBufferSizeMs.n現在の値;                         // CONFIG脱出時にこの値から変更されているようなら\r
                        // this.iSystemASIOBufferSizeMs_initial = this.iSystemASIOBufferSizeMs.n現在の値;                           // サウンドデバイスを再構築する\r
                        this.iSystemASIODevice_initial                  = this.iSystemASIODevice.n現在選択されている項目番号;      //\r
                        this.iSystemSoundTimerType_initial      = this.iSystemSoundTimerType.GetIndex();                                //\r
@@ -1889,7 +1889,7 @@ namespace DTXMania
                        // #33689 2014.6.17 yyagi CONFIGでSoundTimerTypeの設定を変更した場合も、サウンドデバイスを再構築する。\r
                        #region [ サウンドデバイス変更 ]\r
                        if ( this.iSystemSoundType_initial != this.iSystemSoundType.n現在選択されている項目番号 ||\r
-                               // this.iSystemWASAPIBufferSizeMs_initial != this.iSystemWASAPIBufferSizeMs.n現在の値 ||\r
+                                this.iSystemWASAPIBufferSizeMs_initial != this.iSystemWASAPIBufferSizeMs.n現在の値 ||\r
                                // this.iSystemASIOBufferSizeMs_initial != this.iSystemASIOBufferSizeMs.n現在の値 ||\r
                                this.iSystemASIODevice_initial != this.iSystemASIODevice.n現在選択されている項目番号 ||\r
                                this.iSystemSoundTimerType_initial != this.iSystemSoundTimerType.GetIndex() )\r
@@ -1912,8 +1912,8 @@ namespace DTXMania
                                }\r
 \r
                                CDTXMania.Sound管理.t初期化( soundDeviceType,\r
-                                                                               0,\r
-                                                                               // this.iSystemWASAPIBufferSizeMs.n現在の値,\r
+                                                                               // 0,\r
+                                                                               this.iSystemWASAPIBufferSizeMs.n現在の値,\r
                                                                                0,\r
                                                                                // this.iSystemASIOBufferSizeMs.n現在の値,\r
                                                                                this.iSystemASIODevice.n現在選択されている項目番号,\r
@@ -2332,12 +2332,12 @@ namespace DTXMania
                private CItemToggle iSystemBufferedInput;\r
                private CItemInteger iSystemRisky;                                      // #23559 2011.7.27 yyagi\r
                private CItemList iSystemSoundType;                                     // #24820 2013.1.3 yyagi\r
-//             private CItemInteger iSystemWASAPIBufferSizeMs;         // #24820 2013.1.15 yyagi\r
+               private CItemInteger iSystemWASAPIBufferSizeMs;         // #24820 2013.1.15 yyagi\r
 //             private CItemInteger iSystemASIOBufferSizeMs;           // #24820 2013.1.3 yyagi\r
                private CItemList       iSystemASIODevice;                              // #24820 2013.1.17 yyagi\r
 \r
                private int iSystemSoundType_initial;\r
-//             private int iSystemWASAPIBufferSizeMs_initial;\r
+               private int iSystemWASAPIBufferSizeMs_initial;\r
 //             private int iSystemASIOBufferSizeMs_initial;\r
                private int iSystemASIODevice_initial;\r
                private CItemToggle iSystemSoundTimerType;                      // #33689 2014.6.17 yyagi\r
@@ -2552,7 +2552,7 @@ namespace DTXMania
                        CDTXMania.ConfigIni.bUseBoxDefSkin = this.iSystemUseBoxDefSkin.bON;                                                             // #28195 2012.5.6 yyagi\r
 \r
                        CDTXMania.ConfigIni.nSoundDeviceType = this.iSystemSoundType.n現在選択されている項目番号;          // #24820 2013.1.3 yyagi\r
-//                     CDTXMania.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値;                         // #24820 2013.1.15 yyagi\r
+                       CDTXMania.ConfigIni.nWASAPIBufferSizeMs = this.iSystemWASAPIBufferSizeMs.n現在の値;                         // #24820 2013.1.15 yyagi\r
 //                     CDTXMania.ConfigIni.nASIOBufferSizeMs = this.iSystemASIOBufferSizeMs.n現在の値;                                     // #24820 2013.1.3 yyagi\r
                        CDTXMania.ConfigIni.nASIODevice = this.iSystemASIODevice.n現在選択されている項目番号;                      // #24820 2013.1.17 yyagi\r
                        CDTXMania.ConfigIni.bUseOSTimer = this.iSystemSoundTimerType.bON;                                                               // #33689 2014.6.17 yyagi\r
index ad8339a..a84f229 100644 (file)
@@ -2,6 +2,7 @@
 using System.Collections.Generic;\r
 using System.Text;\r
 using System.Drawing;\r
+using System.Diagnostics;\r
 using SlimDX;\r
 using SlimDX.Direct3D9;\r
 using FDK;\r
@@ -271,11 +272,19 @@ namespace DTXMania
                {\r
                        if ( !base.b活性化してない )\r
                        {\r
+                               try\r
+                               {\r
 #if TEST_Direct3D9Ex\r
-                               this.tx描画用 = new CTexture( CDTXMania.app.Device, 320, 355, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default, Usage.Dynamic );\r
+                                       this.tx描画用 = new CTexture( CDTXMania.app.Device, 320, 355, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default, Usage.Dynamic );\r
 #else\r
-                               this.tx描画用 = new CTexture( CDTXMania.app.Device, 278, 355, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Managed );\r
+                                       this.tx描画用 = new CTexture( CDTXMania.app.Device, 278, 355, CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Managed );\r
 #endif\r
+                               }\r
+                               catch ( CTextureCreateFailedException e )\r
+                               {\r
+                                       Trace.TraceError( "CActAVI: OnManagedリソースの作成(): " + e.Message );\r
+                                       this.tx描画用 = null;\r
+                               }\r
                                base.OnManagedリソースの作成();\r
                        }\r
                }\r
index 6e8875c..a5b8b9a 100644 (file)
@@ -3,6 +3,7 @@ using System.Collections.Generic;
 using System.Text;\r
 using System.Runtime.InteropServices;\r
 using System.Drawing;\r
+using System.Diagnostics;\r
 using SlimDX.Direct3D9;\r
 using FDK;\r
 \r
@@ -132,7 +133,14 @@ namespace DTXMania
                        {\r
                                using( Surface surface = CDTXMania.app.Device.GetBackBuffer( 0, 0 ) )\r
                                {\r
-                                       this.sfBackBuffer = Surface.CreateOffscreenPlain( CDTXMania.app.Device, surface.Description.Width, surface.Description.Height, surface.Description.Format, Pool.SystemMemory );\r
+                                       try\r
+                                       {\r
+                                               this.sfBackBuffer = Surface.CreateOffscreenPlain( CDTXMania.app.Device, surface.Description.Width, surface.Description.Height, surface.Description.Format, Pool.SystemMemory );\r
+                                       }\r
+                                       catch ( Direct3D9Exception e )\r
+                                       {\r
+                                               Trace.TraceError( "CAct演奏BGA: Error: ( " + e.Message + " )" );\r
+                                       }\r
                                }\r
                                base.OnManagedリソースの作成();\r
                        }\r
index 34a2743..e5f945e 100644 (file)
@@ -2646,17 +2646,20 @@ namespace DTXMania
                                        cInvisibleChip.StartSemiInvisible( inst );\r
                                        #region [ Chip Fire effects (auto時用) ]\r
                                        bool bSuccessOPEN = bChipIsO && ( autoR || !pushingR ) && ( autoG || !pushingG ) && ( autoB || !pushingB );\r
-                                       if ( ( bChipHasR && ( autoR || pushingR ) && autoPick ) || ( bSuccessOPEN && autoPick ) )\r
+                                       if ( autoPick )                 // autoPickでない時の処理は、 t入力処理・ギターベース(E楽器パート) で行う\r
                                        {\r
-                                               this.actChipFireGB.Start( 0 + lo, 演奏判定ライン座標 );\r
-                                       }\r
-                                       if ( ( bChipHasG && ( autoG || pushingG ) && autoPick ) || ( bSuccessOPEN && autoPick ) )\r
-                                       {\r
-                                               this.actChipFireGB.Start( 1 + lo, 演奏判定ライン座標 );\r
-                                       }\r
-                                       if ( ( bChipHasB && ( autoB || pushingB ) && autoPick ) || ( bSuccessOPEN && autoPick ) )\r
-                                       {\r
-                                               this.actChipFireGB.Start( 2 + lo, 演奏判定ライン座標 );\r
+                                               if ( ( bChipHasR && ( autoR || pushingR ) ) || bSuccessOPEN )\r
+                                               {\r
+                                                       this.actChipFireGB.Start( 0 + lo, 演奏判定ライン座標 );\r
+                                               }\r
+                                               if ( ( bChipHasG && ( autoG || pushingG ) ) || bSuccessOPEN )\r
+                                               {\r
+                                                       this.actChipFireGB.Start( 1 + lo, 演奏判定ライン座標 );\r
+                                               }\r
+                                               if ( ( bChipHasB && ( autoB || pushingB ) ) || bSuccessOPEN )\r
+                                               {\r
+                                                       this.actChipFireGB.Start( 2 + lo, 演奏判定ライン座標 );\r
+                                               }\r
                                        }\r
                                        #endregion\r
                                        #region [ autopick ]\r
index 322ff39..45f1bf6 100644 (file)
@@ -665,7 +665,7 @@ namespace DTXMania
                }\r
                public STAUTOPLAY bAutoPlay;\r
                public int nSoundDeviceType;                            // #24820 2012.12.23 yyagi 出力サウンドデバイス(0=ACM(にしたいが設計がきつそうならDirectShow), 1=ASIO, 2=WASAPI)\r
-//             public int nWASAPIBufferSizeMs;                         // #24820 2013.1.15 yyagi WASAPIのバッファサイズ\r
+               public int nWASAPIBufferSizeMs;                         // #24820 2013.1.15 yyagi WASAPIのバッファサイズ\r
 //             public int nASIOBufferSizeMs;                           // #24820 2012.12.28 yyagi ASIOのバッファサイズ\r
                public int nASIODevice;                                         // #24820 2013.1.17 yyagi ASIOデバイス\r
                public bool bUseOSTimer;                                        // #33689 2014.6.6 yyagi 演奏タイマーの種類\r
@@ -1171,7 +1171,7 @@ namespace DTXMania
                        this.bTight = false;                        // #29500 2012.9.11 kairera0467 TIGHTモード\r
                        this.nSoundDeviceType = FDK.COS.bIsVistaOrLater ?\r
                                (int) ESoundDeviceTypeForConfig.WASAPI : (int) ESoundDeviceTypeForConfig.ACM;   // #24820 2012.12.23 yyagi 初期値はACM | #31927 2013.8.25 yyagi OSにより初期値変更\r
-//                     this.nWASAPIBufferSizeMs = 0;                           // #24820 2013.1.15 yyagi 初期値は0(自動設定)\r
+                       this.nWASAPIBufferSizeMs = 0;                           // #24820 2013.1.15 yyagi 初期値は0(自動設定)\r
                        this.nASIODevice = 0;                                           // #24820 2013.1.17 yyagi\r
 //                     this.nASIOBufferSizeMs = 0;                                     // #24820 2012.12.25 yyagi 初期値は0(自動設定)\r
                        this.bUseOSTimer = false;;                                      // #33689 2014.6.6 yyagi 初期値はfalse (FDKのタイマー。FROM氏考案の独自タイマー)\r
@@ -1335,12 +1335,12 @@ namespace DTXMania
                        sw.WriteLine( "SoundDeviceType={0}", (int) this.nSoundDeviceType );\r
                        sw.WriteLine();\r
 \r
-                       //sw.WriteLine( "; WASAPI使用時のサウンドバッファサイズ" );\r
-                       //sw.WriteLine( "; (0=デバイスに設定されている値を使用, 1~9999=バッファサイズ(単位:ms)の手動指定" );\r
-                       //sw.WriteLine( "; WASAPI Sound Buffer Size." );\r
-                       //sw.WriteLine( "; (0=Use system default buffer size, 1-9999=specify the buffer size(ms) by yourself)" );\r
-                       //sw.WriteLine( "WASAPIBufferSizeMs={0}", (int) this.nWASAPIBufferSizeMs );\r
-                       //sw.WriteLine();\r
+                       sw.WriteLine( "; WASAPI使用時のサウンドバッファサイズ" );\r
+                       sw.WriteLine( "; (0=デバイスに設定されている値を使用, 1~9999=バッファサイズ(単位:ms)の手動指定" );\r
+                       sw.WriteLine( "; WASAPI Sound Buffer Size." );\r
+                       sw.WriteLine( "; (0=Use system default buffer size, 1-9999=specify the buffer size(ms) by yourself)" );\r
+                       sw.WriteLine( "WASAPIBufferSizeMs={0}", (int) this.nWASAPIBufferSizeMs );\r
+                       sw.WriteLine();\r
 \r
                        sw.WriteLine( "; ASIO使用時のサウンドデバイス" );\r
                        sw.WriteLine( "; 存在しないデバイスを指定すると、DTXManiaが起動しないことがあります。" );\r
@@ -2216,10 +2216,10 @@ namespace DTXMania
                                                                                        {\r
                                                                                                this.nSoundDeviceType = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, this.nSoundDeviceType );\r
                                                                                        }\r
-                                                                                       //else if ( str3.Equals( "WASAPIBufferSizeMs" ) )\r
-                                                                                       //{\r
-                                                                                       //    this.nWASAPIBufferSizeMs = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 9999, this.nWASAPIBufferSizeMs );\r
-                                                                                       //}\r
+                                                                                       else if ( str3.Equals( "WASAPIBufferSizeMs" ) )\r
+                                                                                       {\r
+                                                                                               this.nWASAPIBufferSizeMs = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 9999, this.nWASAPIBufferSizeMs );\r
+                                                                                       }\r
                                                                                        else if ( str3.Equals( "ASIODevice" ) )\r
                                                                                        {\r
                                                                                                string[] asiodev = CEnumerateAllAsioDevices.GetAllASIODevices();\r
index 7938a22..925d809 100644 (file)
@@ -20,7 +20,7 @@ namespace DTXMania
        {\r
                // プロパティ\r
                #region [ properties ]\r
-               public static readonly string VERSION = "099c(141020)";\r
+               public static readonly string VERSION = "099c(141224)";\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
@@ -2122,8 +2122,8 @@ for (int i = 0; i < 3; i++) {
                                }\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
index fc64671..f51727c 100644 (file)
@@ -118,7 +118,7 @@ namespace FDK
                #region [ WASAPI/ASIO/DirectSound設定値 ]\r
                /// <summary>\r
                /// <para>WASAPI 排他モード出力における再生遅延[ms](の希望値)。最終的にはこの数値を基にドライバが決定する)。</para>\r
-               /// <para>→ WASAPI初期化時に自動設定するようにしたため、ここで設定した値は使用しないようになった。</para>\r
+               /// <para>0以下の値を指定すると、この数値はWASAPI初期化時に自動設定する。正数を指定すると、その値を設定しようと試みる。</para>\r
                /// </summary>\r
                public static int SoundDelayExclusiveWASAPI = 0;                // SSTでは、50ms\r
                public int GetSoundExclusiveWASAPI()\r
@@ -1197,19 +1197,37 @@ Debug.WriteLine("更に再生に失敗: " + Path.GetFileName(this.strファイ
                }\r
                public void t再生位置を変更する( long n位置ms )\r
                {\r
-                       if( this.bBASSサウンドである )\r
+                       if ( this.bBASSサウンドである )\r
                        {\r
-                               bool b = BassMix.BASS_Mixer_ChannelSetPosition( this.hBassStream, Bass.BASS_ChannelSeconds2Bytes( this.hBassStream, n位置ms * this.db周波数倍率 * this.db再生速度 / 1000.0 ), BASSMode.BASS_POS_BYTES );\r
-                               if ( !b )\r
+                               bool b = true;\r
+                               try\r
+                               {\r
+                                       b = BassMix.BASS_Mixer_ChannelSetPosition( this.hBassStream, Bass.BASS_ChannelSeconds2Bytes( this.hBassStream, n位置ms * this.db周波数倍率 * this.db再生速度 / 1000.0 ), BASSMode.BASS_POS_BYTES );\r
+                               }\r
+                               catch ( Exception e )\r
+                               {\r
+                                       Trace.TraceInformation( Path.GetFileName( this.strファイル名 ) + ": Seek error: " + e.ToString() );\r
+                               }\r
+                               finally\r
                                {\r
-                                       BASSError be = Bass.BASS_ErrorGetCode();\r
-                                       Trace.TraceInformation( Path.GetFileName( this.strファイル名 ) + ": Seek error: " + be.ToString() );\r
+                                       if ( !b )\r
+                                       {\r
+                                               BASSError be = Bass.BASS_ErrorGetCode();\r
+                                               Trace.TraceInformation( Path.GetFileName( this.strファイル名 ) + ": Seek error: " + be.ToString() );\r
+                                       }\r
                                }\r
                        }\r
                        else if( this.bDirectSoundである )\r
                        {\r
                                int n位置sample = (int) ( this.Buffer.Format.SamplesPerSecond * n位置ms * 0.001 * _db周波数倍率 * _db再生速度 );   // #30839 2013.2.24 yyagi; add _db周波数倍率 and _db再生速度\r
-                               this.Buffer.CurrentPlayPosition = n位置sample * this.Buffer.Format.BlockAlignment;\r
+                               try\r
+                               {\r
+                                       this.Buffer.CurrentPlayPosition = n位置sample * this.Buffer.Format.BlockAlignment;\r
+                               }\r
+                               catch ( DirectSoundException e )\r
+                               {\r
+                                       Trace.TraceError( "{0}: Seek error: {1}", Path.GetFileName( this.strファイル名 ), n位置ms, e.Message );\r
+                               }\r
                        }\r
                }\r
 \r
index 98e8e69..fadeec1 100644 (file)
@@ -191,7 +191,10 @@ namespace FDK
                                // Trace.TraceInformation( "Selected Default WASAPI Device: {0}", deviceInfo.name );\r
                                // Trace.TraceInformation( "MinPeriod={0}, DefaultPeriod={1}", deviceInfo.minperiod, deviceInfo.defperiod );\r
                                n更新間隔ms = (long) ( deviceInfo.minperiod * 1000 );\r
-                               n希望バッファサイズms = n更新間隔ms + 1;   // 2013.4.25 #31237 yyagi; バッファサイズ設定の完全自動化。更新間隔=バッファサイズにするとBASS_ERROR_UNKNOWNになるので+1する。\r
+                               if ( n希望バッファサイズms <= 0 || n希望バッファサイズms < n更新間隔ms + 1 )\r
+                               {\r
+                                       n希望バッファサイズms = n更新間隔ms + 1;   // 2013.4.25 #31237 yyagi; バッファサイズ設定の完全自動化。更新間隔=バッファサイズにするとBASS_ERROR_UNKNOWNになるので+1する。\r
+                               }\r
                        }\r
                        else\r
                        {\r
index c7ded98..0d47b1e 100644 (file)
Binary files a/実行時フォルダ(DTXCreator)/dll/FDK.dll and b/実行時フォルダ(DTXCreator)/dll/FDK.dll differ
index eb79a76..ade3eb1 100644 (file)
Binary files a/実行時フォルダ/DTXManiaGR.exe and b/実行時フォルダ/DTXManiaGR.exe differ
index c7ded98..0d47b1e 100644 (file)
Binary files a/実行時フォルダ/dll/FDK.dll and b/実行時フォルダ/dll/FDK.dll differ