// new string[] { "OFF", "SEMI", "FULL" } );\r
//this.list項目リスト.Add( this.iDrumsInvisible );\r
\r
+ this.iDrumsLanePosition = new CItemList( "LanePosition", CItemBase.Eパネル種別.通常, (int) CDTXMania.ConfigIni.eドラムレーン表示位置,\r
+ "ドラムのレーン表示位置を設定します。\n" +\r
+ "LEFT(左側), またはCENTER(中央)を設定できます。",\r
+ "Choose drums lane position.\n" +\r
+ "You can choose LEFT or CENTER.",\r
+ new string[] { "LEFT", "CENTER" } );\r
+ this.list項目リスト.Add( this.iDrumsLanePosition );\r
+\r
this.iCommonDark = new CItemList( "Dark", CItemBase.Eパネル種別.通常, (int) CDTXMania.ConfigIni.eDark,\r
"HALF: 背景、レーン、ゲージが表示されなくなります。\n" +\r
"FULL: さらに小節線、拍線、判定ライン、パッドも表示されなくなります。",\r
//private CItemToggle iDrumsSudden;\r
private CItemToggle iDrumsTight;\r
private CItemToggle iDrumsGraph; // #24074 2011.01.23 add ikanick\r
+ private CItemList iDrumsLanePosition;\r
\r
//private CItemToggle iGuitarAutoPlay;\r
private CItemThreeState iGuitarAutoPlayAll; // #23886 2012.5.8 yyagi\r
CDTXMania.ConfigIni.eDark = (Eダークモード)this.iCommonDark.n現在選択されている項目番号;\r
CDTXMania.ConfigIni.nRisky = this.iSystemRisky.n現在の値; // #23559 2911.7.27 yyagi\r
//CDTXMania.ConfigIni.e判定表示優先度.Drums = (E判定表示優先度) this.iDrumsJudgeDispPriority.n現在選択されている項目番号;\r
+ CDTXMania.ConfigIni.eドラムレーン表示位置 = (Eドラムレーン表示位置) this.iDrumsLanePosition.n現在選択されている項目番号;\r
}\r
private void tConfigIniへ記録する・Guitar()\r
{\r
y -= 0x10 * 2;\r
//CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Frame: {0:####0} fps", CDTXMania.FPS.n現在のFPS ) );\r
CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Frame: {0} fps", CDTXMania.FPS.n現在のFPS ) );\r
- //y -= 0x10 * 2;\r
- //CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound CPU : {0:####0.00}%", CDTXMania.Sound管理.GetCPUusage() ) );\r
- //y -= 0x10 * 2;\r
- //CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound Mixing: {0:####0}", CDTXMania.Sound管理.GetMixingStreams() ) );\r
- //y -= 0x10 * 2;\r
- //CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound Streams: {0:####0}", CDTXMania.Sound管理.GetStreams() ) );\r
- //y -= 0x10 * 2;\r
+ y -= 0x10 * 2;\r
+ CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound CPU : {0:####0.00}%", CDTXMania.Sound管理.GetCPUusage() ) );\r
+ y -= 0x10 * 2;\r
+ CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound Mixing: {0:####0}", CDTXMania.Sound管理.GetMixingStreams() ) );\r
+ y -= 0x10 * 2;\r
+ CDTXMania.act文字コンソール.tPrint( x, y, C文字コンソール.Eフォント種別.白, string.Format( "Sound Streams: {0:####0}", CDTXMania.Sound管理.GetStreams() ) );\r
+ y -= 0x10 * 2;\r
}\r
}\r
}\r
if ( listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する\r
{\r
CDTX.CWAV wc = listWAV[ pChip.n整数値・内部番号 ];\r
+//Debug.Write( "[AddMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );\r
+\r
for ( int i = 0; i < nPolyphonicSounds; i++ )\r
{\r
if ( wc.rSound[ i ] != null )\r
//CDTXMania.Sound管理.AddMixer( wc.rSound[ i ] );\r
AddMixer( wc.rSound[ i ], pChip.b演奏終了後も再生が続くチップである );\r
}\r
+ //else\r
+ //{\r
+ // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );\r
+ // break;\r
+ //}\r
+ //if ( i == nPolyphonicSounds - 1 )\r
+ //{\r
+ // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );\r
+ //}\r
}\r
}\r
}\r
if ( listWAV.ContainsKey( pChip.n整数値・内部番号 ) ) // 参照が遠いので後日最適化する\r
{\r
CDTX.CWAV wc = listWAV[ pChip.n整数値・内部番号 ];\r
- for ( int i = 0; i < nPolyphonicSounds; i++ )\r
+//Debug.Write( "[DelMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );\r
+ for ( int i = 0; i < nPolyphonicSounds; i++ )\r
{\r
if ( wc.rSound[ i ] != null )\r
{\r
RemoveMixer( wc.rSound[ i ] ); // (ミキサー解除のタイミングが遅延する場合の対応が面倒なので。)\r
} // そこで、代わりにフラグをチェックしてミキサー削除ロジックへの遷移をカットする。\r
}\r
- }\r
+ //else\r
+ //{\r
+ // Debug.WriteLine( ", nPoly=" + i + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );\r
+ // break;\r
+ //}\r
+ //if ( i == nPolyphonicSounds - 1 )\r
+ //{\r
+ // Debug.WriteLine( ", nPoly=" + nPolyphonicSounds + ", Mix=" + CDTXMania.Sound管理.GetMixingStreams() );\r
+ //}\r
+ }\r
}\r
}\r
break;\r
bool pushingB = CDTXMania.Pad.b押されている( inst, Eパッド.B );\r
\r
cInvisibleChip.StartSemiInvisible( inst );\r
- #region [ Chip Fire effects ]\r
+ #region [ Chip Fire effects (auto時用) ]\r
bool bSuccessOPEN = bChipIsO && ( autoR || !pushingR ) && ( autoG || !pushingG ) && ( autoB || !pushingB );\r
- if ( ( bChipHasR && ( autoR || pushingR ) && autoPick ) || bSuccessOPEN )\r
- {\r
- this.actChipFireGB.Start( 0 + lo, 演奏判定ライン座標 );\r
- }\r
- if ( ( bChipHasG && ( autoG || pushingG ) && autoPick ) || bSuccessOPEN )\r
- {\r
- this.actChipFireGB.Start( 1 + lo, 演奏判定ライン座標 );\r
- }\r
- if ( ( bChipHasB && ( autoB || pushingB ) && autoPick ) || bSuccessOPEN )\r
+ if ( autoPick ) // autoPickでない時の処理は、 t入力処理・ギターベース(E楽器パート) で行う\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
}\r
\r
protected abstract void t背景テクスチャの生成();\r
- protected void t背景テクスチャの生成( string DefaultBgFilename, Rectangle bgrect, string bgfilename )\r
+ protected void t背景テクスチャの生成( string DefaultBgFilename, string DefaultLaneFilename, Rectangle bgrect, string bgfilename )\r
{ // Default...: レーン等があるレイヤー bgfilename: DTXファイルで指定する背景\r
Bitmap image = null;\r
bool bSuccessLoadDTXbgfile = false;\r
\r
+ int[] offsetX = new int[2]{ 96, 506 };\r
+ int nLanePosition = (int) CDTXMania.ConfigIni.eドラムレーン表示位置;\r
+\r
if ( bgfilename != null && File.Exists( bgfilename ) && !CDTXMania.DTX.bチップがある.Movie )\r
{\r
try\r
bitmap2.Dispose();\r
#endregion\r
\r
- #region [ レーンフレームを合成 ]\r
- image = new Bitmap( CSkin.Path( DefaultBgFilename ) );\r
+ #region [ レーン外・レーンそのもののフレームを合成 ]\r
+ image = new Bitmap( CSkin.Path( DefaultBgFilename ) ); // レーン外のフレーム\r
graphics3 = Graphics.FromImage( image );\r
+\r
+ #region [ レーンのフレームがあれば、それを合成 ]\r
+ if ( DefaultLaneFilename != "" )\r
+ {\r
+ Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );\r
+ graphics3.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );\r
+ bmLane.Dispose();\r
+ }\r
+ #endregion\r
+ \r
ColorMatrix matrix2 = new ColorMatrix();\r
matrix2.Matrix00 = 1f;\r
matrix2.Matrix11 = 1f;\r
ImageAttributes imageAttr = new ImageAttributes();\r
imageAttr.SetColorMatrix( newColorMatrix );\r
graphics3.DrawImage( bitmap3, new Rectangle( 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height ), 0, 0, SampleFramework.GameWindowSize.Width, SampleFramework.GameWindowSize.Height, GraphicsUnit.Pixel, imageAttr );\r
- imageAttr.Dispose();\r
- graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );\r
- graphics3.Dispose();\r
+ // graphics3.DrawImage( bitmap3, bgrect, bgrect.X, bgrect.Y, bgrect.Width, bgrect.Height, GraphicsUnit.Pixel );\r
bitmap3.Dispose();\r
#endregion\r
+\r
+ imageAttr.Dispose();\r
+ graphics3.Dispose();\r
bSuccessLoadDTXbgfile = true;\r
}\r
catch\r
try\r
{\r
image = new Bitmap( bgfilename );\r
+\r
+ if ( DefaultLaneFilename != "" )\r
+ {\r
+ Bitmap bmLane = new Bitmap( CSkin.Path( DefaultLaneFilename ) );\r
+ Graphics g = Graphics.FromImage( image );\r
+ g.DrawImage( bmLane, offsetX[ nLanePosition ], 0 );\r
+ g.Dispose();\r
+ bmLane.Dispose();\r
+ }\r
}\r
catch\r
{\r
{\r
Rectangle bgrect = new Rectangle( (int) ( 181 * Scale.X ), (int) ( 50 * Scale.Y ), (int) ( 278 * Scale.X ), (int) ( 355 * Scale.Y ) );\r
string DefaultBgFilename = @"Graphics\ScreenPlayGuitar background.png";\r
+ string DefaultLaneFilename = "";\r
string BgFilename = "";\r
string BACKGROUND = null;\r
if ( ( CDTXMania.DTX.BACKGROUND_GR != null ) && ( CDTXMania.DTX.BACKGROUND_GR.Length > 0 ) )\r
{\r
BgFilename = CDTXMania.DTX.strフォルダ名 + BACKGROUND;\r
}\r
- base.t背景テクスチャの生成( DefaultBgFilename, bgrect, BgFilename );\r
+ base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename );\r
}\r
\r
protected override void t進行描画・チップ・ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )\r
protected override void t背景テクスチャの生成()\r
{\r
Rectangle bgrect = new Rectangle( (int) ( 338 * Scale.X ), (int) ( 57 * Scale.Y ), (int) ( 278 * Scale.X ), (int) ( 355 * Scale.Y ) );\r
- string DefaultBgFilename = @"Graphics\ScreenPlayDrums background.png";\r
+ string DefaultBgFilename = @"Graphics\ScreenPlayDrums-background.png";\r
+ string DefaultLaneFilename = @"Graphics\ScreenPlayDrums_Lane_parts_drums.png";\r
string BgFilename = "";\r
if ( ( ( CDTXMania.DTX.BACKGROUND != null ) && ( CDTXMania.DTX.BACKGROUND.Length > 0 ) ) && !CDTXMania.ConfigIni.bストイックモード )\r
{\r
BgFilename = CDTXMania.DTX.strフォルダ名 + CDTXMania.DTX.BACKGROUND;\r
}\r
- base.t背景テクスチャの生成( DefaultBgFilename, bgrect, BgFilename );\r
+ base.t背景テクスチャの生成( DefaultBgFilename, DefaultLaneFilename, bgrect, BgFilename );\r
}\r
\r
protected override void t進行描画・チップ・ドラムス( CConfigIni configIni, ref CDTX dTX, ref CDTX.CChip pChip )\r
//public STDGBVALUE<E判定表示優先度> e判定表示優先度;\r
public E判定表示優先度 e判定表示優先度;\r
public STDGBVALUE<E判定位置> e判定位置; // #33891 2014.6.26 yyagi\r
+ public Eドラムレーン表示位置 eドラムレーン表示位置;\r
public bool bScoreIniを出力する;\r
public bool bSTAGEFAILED有効;\r
public STDGBVALUE<bool> bSudden;\r
this.bLeft = new STDGBVALUE<bool>();\r
this.e判定位置 = new STDGBVALUE<E判定位置>(); // #33891 2014.6.26 yyagi\r
this.判定文字表示位置 = new STDGBVALUE<E判定文字表示位置>();\r
+ this.eドラムレーン表示位置 = new Eドラムレーン表示位置();\r
this.n譜面スクロール速度 = new STDGBVALUE<int>();\r
this.nInputAdjustTimeMs = new STDGBVALUE<int>(); // #23580 2011.1.3 yyagi\r
this.nJudgeLinePosOffset = new STDGBVALUE<int>(); // #31602 2013.6.23 yyagi\r
sw.WriteLine( "ShowLagTime={0}", this.nShowLagType ); //\r
sw.WriteLine();\r
sw.WriteLine( "; 判定・コンボ表示優先度(0:チップの下, 1:チップの上)" );\r
+ sw.WriteLine( "; judgement/combo display priority (0:under chips, 1:over chips)" );\r
sw.WriteLine( "JudgeDispPriority={0}" , (int) this.e判定表示優先度 );\r
sw.WriteLine();\r
+ sw.WriteLine( "; ドラムのレーン表示位置(0:左側, 1:中央)" );\r
+ sw.WriteLine( "; drums lane position (0:LEFT, 1:CENTER)" );\r
+ sw.WriteLine( "DrumsLanePosition={0}", (int) this.eドラムレーン表示位置 );\r
+ sw.WriteLine();\r
+\r
+\r
sw.WriteLine( "; リザルト画像自動保存機能(0:OFF, 1:ON)" ); // #25399 2011.6.9 yyagi\r
sw.WriteLine( "; Set \"1\" if you'd like to save result screen image automatically"); //\r
sw.WriteLine( "; when you get hiscore/hiskill."); //\r
{\r
this.e判定表示優先度 = (E判定表示優先度) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.e判定表示優先度 );\r
}\r
+ else if ( str3.Equals( "DrumsLanePosition" ) )\r
+ {\r
+ this.eドラムレーン表示位置 = (Eドラムレーン表示位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 1, (int) this.eドラムレーン表示位置 );\r
+ }\r
else if ( str3.Equals( "AutoResultCapture" ) ) // #25399 2011.6.9 yyagi\r
{\r
this.bIsAutoResultCapture = C変換.bONorOFF( str4[ 0 ] );\r
this.bTimeStretch = C変換.bONorOFF( str4[ 0 ] );\r
}\r
#region [ AdjustTime ]\r
- else if( str3.Equals( "InputAdjustTimeDrums" ) ) // #23580 2011.1.3 yyagi\r
+ else if ( str3.Equals( "InputAdjustTimeDrums" ) ) // #23580 2011.1.3 yyagi\r
{\r
this.nInputAdjustTimeMs.Drums = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Drums );\r
}\r
- else if( str3.Equals( "InputAdjustTimeGuitar" ) ) // #23580 2011.1.3 yyagi\r
+ else if ( str3.Equals( "InputAdjustTimeGuitar" ) ) // #23580 2011.1.3 yyagi\r
{\r
this.nInputAdjustTimeMs.Guitar = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Guitar );\r
}\r
- else if( str3.Equals( "InputAdjustTimeBass" ) ) // #23580 2011.1.3 yyagi\r
+ else if ( str3.Equals( "InputAdjustTimeBass" ) ) // #23580 2011.1.3 yyagi\r
{\r
this.nInputAdjustTimeMs.Bass = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, -99, 99, this.nInputAdjustTimeMs.Bass );\r
}\r
this.e判定位置.Bass = (E判定位置) C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 2, (int) this.e判定位置.Bass );\r
}\r
#endregion\r
- else if( str3.Equals( "BufferedInput" ) )\r
+ else if ( str3.Equals( "BufferedInput" ) )\r
{\r
this.bバッファ入力を行う = C変換.bONorOFF( str4[ 0 ] );\r
}\r
{\r
this.nVelocityMin.LC = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.LC );\r
}\r
- else if( str3.Equals( "HHVelocityMin" ) )\r
+ else if ( str3.Equals( "HHVelocityMin" ) )\r
{\r
this.nVelocityMin.HH = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.HH );\r
}\r
- else if( str3.Equals( "SDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "SDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.SD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.SD );\r
}\r
- else if( str3.Equals( "BDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "BDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.BD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.BD );\r
}\r
- else if( str3.Equals( "HTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "HTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.HT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.HT );\r
}\r
- else if( str3.Equals( "LTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "LTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.LT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.LT );\r
}\r
- else if( str3.Equals( "FTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "FTVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.FT = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.FT );\r
}\r
- else if( str3.Equals( "CYVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "CYVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.CY = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.CY );\r
}\r
- else if( str3.Equals( "RDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
+ else if ( str3.Equals( "RDVelocityMin" ) ) // #23857 2011.1.31 yyagi\r
{\r
this.nVelocityMin.RD = C変換.n値を文字列から取得して範囲内に丸めて返す( str4, 0, 127, this.nVelocityMin.RD );\r
}\r
Chipより下,\r
Chipより上\r
}\r
+ internal enum Eドラムレーン表示位置\r
+ {\r
+ Left = 0,\r
+ Center = 1\r
+ }\r
internal enum EAVI種別\r
{\r
Unknown,\r
{\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
- BASSError be = Bass.BASS_ErrorGetCode();\r
- Trace.TraceInformation( Path.GetFileName( this.strファイル名 ) + ": Seek error: " + be.ToString() );\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
+ 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
// 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
#endregion\r
#region [ BASS の初期化。]\r
int nデバイス = 0; // 0:"no sound" … BASS からはデバイスへアクセスさせない。\r
+ //int nデバイス = -1; // 0:"no sound" … BASS からはデバイスへアクセスさせない。\r
int n周波数 = 44100; // 仮決め。lデバイス(≠ドライバ)がネイティブに対応している周波数であれば何でもいい?ようだ。いずれにしろBASSMXで自動的にリサンプリングされる。\r
if ( !Bass.BASS_Init( nデバイス, n周波数, BASSInit.BASS_DEVICE_DEFAULT, IntPtr.Zero ) )\r
throw new Exception( string.Format( "BASS の初期化に失敗しました。(BASS_Init)[{0}]", Bass.BASS_ErrorGetCode().ToString() ) );\r
#region [ 指定されたサウンドファイルをBASSでオープンし、必要最小限の情報を取得する。]\r
//this.hBassStream = Bass.BASS_StreamCreateFile( this.filename, 0, 0, BASSFlag.BASS_STREAM_PRESCAN | BASSFlag.BASS_STREAM_DECODE );\r
this.hBassStream = Bass.BASS_StreamCreateFile( this.filename, 0, 0, BASSFlag.BASS_STREAM_DECODE );\r
+ //this.hBassStream = Bass.BASS_StreamCreateFile( this.filename, 0, 0, BASSFlag.BASS_SAMPLE_FLOAT | BASSFlag.BASS_STREAM_PRESCAN );\r
if ( this.hBassStream == 0 )\r
throw new Exception( string.Format( "{0}: サウンドストリームの生成に失敗しました。(BASS_StreamCreateFile)[{1}]", filename, Bass.BASS_ErrorGetCode().ToString() ) );\r
\r
Bass.BASS_Free();\r
throw new Exception( errmes );\r
}\r
+\r
+\r
+\r
+ int bs = Bass.BASS_ChannelSetFX( this.hBassStream, BASSFXType.BASS_FX_BFX_BQF, 1 );\r
+\r
+ BASS_BFX_BQF param = new BASS_BFX_BQF(\r
+ BASSBFXBQF.BASS_BFX_BQF_LOWPASS, // filter\r
+ 800.0f, // center default=200\r
+ 15, // gain deafult=0\r
+ 0, // bandwidth\r
+ 1, //0.67f, // Q\r
+ 0, // s\r
+ BASSFXChan.BASS_BFX_CHANALL //chans\r
+ );\r
+\r
+ bool b = Bass.BASS_FXSetParameters( bs, param );\r
+ if ( b == false )\r
+ {\r
+ Debug.WriteLine( "effect set failed: " + Bass.BASS_ErrorGetCode().ToString() );\r
+ }\r
+ //bool b2 = Bass.BASS_ChannelPlay( this.hBassStream, false );\r
+ //if ( b2 == false )\r
+ //{\r
+ // Debug.WriteLine( "plyback failed: " + Bass.BASS_ErrorGetCode().ToString() );\r
+ //}\r
#endregion\r
}\r
#endregion\r
\r
BPMBEATPROC _beatProc = new BPMBEATPROC( GetBeat_ProgressCallback );\r
\r
+ //\r
+ //\r
+ // LPFを通してから、BeatDecodeGetしてみること。\r
+ //\r
+ //\r
+\r
bool ret = BassFx.BASS_FX_BPM_BeatDecodeGet(\r
this.hBassStream,\r
0,\r