355,\r
CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Default, Usage.Dynamic );\r
#else\r
- this.tx描画用 = new CTexture( CDTXMania.app.Device,\r
- //(bIsPreviewMovie)? 204 : 278,\r
- //(bIsPreviewMovie)? 269 : 355,\r
- ( bIsPreviewMovie ) ? 204 : SampleFramework.GameWindowSize.Width,\r
- ( bIsPreviewMovie ) ? 269 : SampleFramework.GameWindowSize.Height,\r
- CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Managed );\r
+ try\r
+ {\r
+ this.tx描画用 = new CTexture( CDTXMania.app.Device,\r
+ //(bIsPreviewMovie)? 204 : 278,\r
+ //(bIsPreviewMovie)? 269 : 355,\r
+ ( bIsPreviewMovie ) ? 204 : SampleFramework.GameWindowSize.Width,\r
+ ( bIsPreviewMovie ) ? 269 : SampleFramework.GameWindowSize.Height,\r
+ CDTXMania.app.GraphicsDeviceManager.CurrentSettings.BackBufferFormat, Pool.Managed );\r
+ }\r
+ catch ( CTextureCreateFailedException e )\r
+ {\r
+ Trace.TraceError( "CActAVI: OnManagedリソースの作成(): " + e.Message );\r
+ this.tx描画用 = null;\r
+ }\r
#endif\r
this.tx描画用.vc拡大縮小倍率 = new Vector3( Scale.X, Scale.Y, 1f );\r
//this.tx描画用.vc拡大縮小倍率 = new Vector3( 2f, 2f, 1f );\r
using System.Text;\r
using System.Runtime.InteropServices;\r
using System.Drawing;\r
+using System.Diagnostics;\r
using SlimDX.Direct3D9;\r
using SlimDX;\r
using FDK;\r
{\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
}\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 bool bWASAPIBufferAutoSet;\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
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
#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
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