• R/O
  • HTTP
  • SSH
  • HTTPS

コミット

タグ
未設定

よく使われているワード(クリックで追加)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

コミットメタ情報

リビジョン72b16a12408506f7c65983ee4f312685af398b7f (tree)
日時2021-09-27 23:03:03
作者yyagi <yyagi.dtxmania@gmai...>
コミッターyyagi

ログメッセージ

#37271 ドラムとギター/ベースの最大同時発音数を独立して設定できるようにした。CONFIGURATION/System/Sound Option/PolyphonicSoundsGBでギター/ベースの最大同時発音数を設定する。ドラムは従来のPolyphonicSounds (末尾にGBなし) をそのまま使う。従来ギター/ベースの最大同時発音数は2又は1(ドラムの最大同時発音数で変化)だったが、ドラムとは無関係に独立して最大発音数を設定できるようにした。初期値はドラムとギター/ベースがそれぞれ4と2。ドラムは従来比で倍増、ギター/ベースは従来同様(だが設定で増加させることができるようになった)

変更サマリ

  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTX.cs"
  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXNestedTypes.cs"
  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CActConfigList.cs"
  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CConfigXml.cs"
  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/07.\346\274\224\345\245\217/CStage\346\274\224\345\245\217\347\224\273\351\235\242\345\205\261\351\200\232.cs"
  • delete: "DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"

差分

--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTX.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTX.cs"
@@ -216,6 +216,7 @@ namespace DTXMania
216216 #endregion
217217 this.nBGMAdjust = 0;
218218 this.nPolyphonicSounds = CDTXMania.Instance.ConfigIni.nPolyphonicSounds;
219+ this.nPolyphonicSoundsGB = CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB;
219220 this.dbDTXVPlaySpeed = 1.0f;
220221 this.bUse556x710BGAAVI = false;
221222 this.n使用レーン数 = new STDGBSValue<EUseLanes>();
@@ -505,7 +506,7 @@ namespace DTXMania
505506 {
506507 if (wc.rSound[0] != null && wc.rSound[0].n総演奏時間ms >= 5000)
507508 {
508- for (int i = 0; i < nPolyphonicSounds; i++)
509+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
509510 {
510511 if ((wc.rSound[i] != null) && (wc.rSound[i].b再生中))
511512 {
@@ -537,7 +538,7 @@ namespace DTXMania
537538 {
538539 if (wc.rSound[0] != null && wc.rSound[0].n総演奏時間ms >= 5000)
539540 {
540- for (int i = 0; i < nPolyphonicSounds; i++)
541+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
541542 {
542543 if ((wc.rSound[i] != null) && (wc.rSound[i].b再生中))
543544 {
@@ -560,7 +561,7 @@ namespace DTXMania
560561 {
561562 if (wc.rSound[0] != null)
562563 {
563- for (int i = 0; i < nPolyphonicSounds; i++)
564+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
564565 {
565566 if ((wc.rSound[i] != null) && (wc.rSound[i].b再生中))
566567 {
@@ -581,7 +582,7 @@ namespace DTXMania
581582 if (this.listWAV.ContainsKey(nWaveの内部番号))
582583 {
583584 CWAV cwav = this.listWAV[nWaveの内部番号];
584- for (int i = 0; i < nPolyphonicSounds; i++)
585+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
585586 {
586587 if (cwav.rSound[i] != null && cwav.rSound[i].b再生中)
587588 {
@@ -643,15 +644,15 @@ namespace DTXMania
643644 }
644645
645646 #region [ 同時発音数を、チャンネルによって変える ]
646- int nPoly = nPolyphonicSounds;
647- if (!bIsDirectSound) // DShowでの再生の場合はミキシング負荷が高くないため、
648- { // チップのライフタイム管理を行わない
649- if (cwav.bIsBassSound) nPoly = (nPolyphonicSounds >= 2) ? 2 : 1;
650- else if (cwav.bIsGuitarSound) nPoly = (nPolyphonicSounds >= 2) ? 2 : 1;
647+ int nPoly = Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB);
648+ //if (!bIsDirectSound) // DShowでの再生の場合はミキシング負荷が高くないため、
649+ //{ // チップのライフタイム管理を行わない
650+ if (cwav.bIsBassSound) nPoly = nPolyphonicSoundsGB; //(nPolyphonicSounds >= 2) ? 2 : 1;
651+ else if (cwav.bIsGuitarSound) nPoly = nPolyphonicSoundsGB; //(nPolyphonicSounds >= 2) ? 2 : 1;
651652 else if (cwav.bIsSESound) nPoly = 1;
652653 else if (cwav.bIsBGMSound) nPoly = 1;
653- }
654- if (cwav.bIsBGMSound) nPoly = 1;
654+ //}
655+ //if (cwav.bIsBGMSound) nPoly = 1;
655656 #endregion
656657
657658 // 残りはClone等で登録する
@@ -662,7 +663,7 @@ namespace DTXMania
662663 cwav.rSound[i] = (CSound)cwav.rSound[0].Clone(); // #24007 2011.9.5 yyagi add: to accelerate loading chip sounds
663664 // CDTXMania.Instance.app.Sound管理.tサウンドを登録する( cwav.rSound[ j ] );
664665 }
665- for (int i = nPoly; i < nPolyphonicSounds; i++)
666+ for (int i = nPoly; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
666667 {
667668 cwav.rSound[i] = null;
668669 }
@@ -696,7 +697,7 @@ namespace DTXMania
696697 catch (Exception exception)
697698 {
698699 Trace.TraceError("サウンドの生成に失敗しました。({0})({1})({2})", exception.Message, cwav.strコメント文, str);
699- for (int j = 0; j < nPolyphonicSounds; j++)
700+ for (int j = 0; j < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); j++)
700701 {
701702 cwav.rSound[j] = null;
702703 }
@@ -752,7 +753,7 @@ namespace DTXMania
752753 if (this.listWAV.ContainsKey(pChip.n整数値_内部番号))
753754 {
754755 CWAV wc = this.listWAV[pChip.n整数値_内部番号];
755- int index = wc.n現在再生中のサウンド番号 = (wc.n現在再生中のサウンド番号 + 1) % nPolyphonicSounds;
756+ int index = wc.n現在再生中のサウンド番号 = (wc.n現在再生中のサウンド番号 + 1) % Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB);
756757 if ((wc.rSound[0] != null) &&
757758 (wc.rSound[0].bストリーム再生する || wc.rSound[index] == null))
758759 {
@@ -789,7 +790,7 @@ namespace DTXMania
789790 }
790791 foreach (CWAV cwav in this.listWAV.Values)
791792 {
792- for (int j = 0; j < nPolyphonicSounds; j++)
793+ for (int j = 0; j < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); j++)
793794 {
794795 if ((cwav.rSound[j] != null) && cwav.rSound[j].b再生中)
795796 {
@@ -802,7 +803,7 @@ namespace DTXMania
802803 {
803804 foreach (CWAV cwav in this.listWAV.Values)
804805 {
805- for (int i = 0; i < nPolyphonicSounds; i++)
806+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
806807 {
807808 if ((cwav.rSound[i] != null) && cwav.rSound[i].b再生中)
808809 {
@@ -820,7 +821,7 @@ namespace DTXMania
820821 {
821822 foreach (CWAV cwav in this.listWAV.Values)
822823 {
823- for (int i = 0; i < nPolyphonicSounds; i++)
824+ for (int i = 0; i < Math.Max(nPolyphonicSounds, nPolyphonicSoundsGB); i++)
824825 {
825826 if ((cwav.rSound[i] != null) && cwav.rSound[i].b一時停止中)
826827 {
@@ -1265,6 +1266,7 @@ namespace DTXMania
12651266 private int n現在の乱数;
12661267
12671268 private int nPolyphonicSounds = 4; // #28228 2012.5.1 yyagi
1269+ private int nPolyphonicSoundsGB = 4;
12681270
12691271 private int n内部番号BPM1to;
12701272 private int n内部番号WAV1to;
--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXNestedTypes.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\202\263\343\202\242\343\200\201\346\233\262/CDTXNestedTypes.cs"
@@ -391,13 +391,13 @@ namespace DTXMania
391391 public List<EChannel> listこのWAVを使用するチャンネル番号の集合 = new List<EChannel>(16);
392392 public int nチップサイズ = 100;
393393 public int n位置;
394- public long[] n一時停止時刻 = new long[CDTXMania.Instance.ConfigIni.nPolyphonicSounds]; // 4
394+ public long[] n一時停止時刻 = new long[ Math.Max( CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB) ]; // 4
395395 public int n音量 = 100;
396396 public int n現在再生中のサウンド番号;
397- public long[] n再生開始時刻 = new long[CDTXMania.Instance.ConfigIni.nPolyphonicSounds]; // 4
397+ public long[] n再生開始時刻 = new long[ Math.Max( CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB) ]; // 4
398398 public int n内部番号;
399399 public int n表記上の番号;
400- public CSound[] rSound = new CSound[CDTXMania.Instance.ConfigIni.nPolyphonicSounds]; // 4
400+ public CSound[] rSound = new CSound[ Math.Max( CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB) ]; // 4
401401 public string strコメント文 = "";
402402 public string strファイル名 = "";
403403 public bool bBGMとして使わない
@@ -448,7 +448,7 @@ namespace DTXMania
448448
449449 if (bManagedリソースの解放も行う)
450450 {
451- for (int i = 0; i < CDTXMania.Instance.ConfigIni.nPolyphonicSounds; i++) // 4
451+ for (int i = 0; i < Math.Max(CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB); i++) // 4
452452 {
453453 if (this.rSound[i] != null)
454454 CDTXMania.Instance.Sound管理.tサウンドを破棄する(this.rSound[i]);
--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CActConfigList.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CActConfigList.cs"
@@ -504,6 +504,7 @@ namespace DTXMania
504504 list項目リスト.Add( CDTXMania.Instance.ConfigIni.bDynamicBassMixerManagement );
505505 list項目リスト.Add( CDTXMania.Instance.ConfigIni.nMasterVolume );
506506 list項目リスト.Add( CDTXMania.Instance.ConfigIni.nPolyphonicSounds );
507+ list項目リスト.Add( CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB );
507508 list項目リスト.Add( CDTXMania.Instance.ConfigIni.eClickType );
508509 list項目リスト.Add( CDTXMania.Instance.ConfigIni.nClickHighVolume );
509510 list項目リスト.Add( CDTXMania.Instance.ConfigIni.nClickLowVolume );
--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CConfigXml.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/04.\343\202\263\343\203\263\343\203\225\343\202\243\343\202\260/CConfigXml.cs"
@@ -415,8 +415,13 @@ namespace DTXMania
415415 /// 起動時にEnumerate Songsをする/しない
416416 /// </summary>
417417 [DataMember(Order = 119)]
418- public COptionBool bEnumerateSongsInBoot; // #40772 2020.10.12 add yyagi
418+ public COptionBool bEnumerateSongsInBoot; // #40772 2020.10.12 add yyagi
419419
420+ /// <summary>
421+ /// Guitar/BassのnPolyphonicSounds
422+ /// </summary>
423+ [DataMember(Order = 119)]
424+ public COptionInteger nPolyphonicSoundsGB; // #37271 2021.9.27 add yyagi
420425
421426 public int GetLaneX(ELane e)
422427 {
@@ -635,7 +640,8 @@ namespace DTXMania
635640 nChipFadeoutTimeMs = new COptionInteger(2000);
636641 rcViewerWindow = new Coordinates.CRect(100, 100, 640, 360);
637642 nMasterVolume = new COptionInteger(100);
638- nPolyphonicSounds = new COptionInteger(2); // #38474 2018.8.3 yyagi 4 -> 2, to reduce sound mixing load
643+ nPolyphonicSounds = new COptionInteger(4); // #38474 2018.8.3 yyagi 4 -> 2, to reduce sound mixing load
644+ nPolyphonicSoundsGB = new COptionInteger(2);
639645
640646 eClickType = new COptionEnum<EClickType>(EClickType.Off);
641647 nClickHighVolume = new COptionInteger(100);
@@ -954,6 +960,7 @@ namespace DTXMania
954960
955961 nMasterVolume.Initialize( "strCfgSysMasterVolume", 0, 201);
956962 nPolyphonicSounds.Initialize( "strCfgSysPolyphonicSounds", 1, 11 );
963+ nPolyphonicSoundsGB.Initialize("strCfgSysPolyphonicSoundsGB", 1, 11);
957964
958965 // dgb
959966 for (EPart i = EPart.Drums; i <= EPart.Unknown; i++)
--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/07.\346\274\224\345\245\217/CStage\346\274\224\345\245\217\347\224\273\351\235\242\345\205\261\351\200\232.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\343\202\271\343\203\206\343\203\274\343\202\270/07.\346\274\224\345\245\217/CStage\346\274\224\345\245\217\347\224\273\351\235\242\345\205\261\351\200\232.cs"
@@ -434,7 +434,7 @@ namespace DTXMania
434434 if (CDTXMania.Instance.DTX.listWAV.ContainsKey(pChip.n整数値_内部番号))
435435 {
436436 CDTX.CWAV wc = CDTXMania.Instance.DTX.listWAV[pChip.n整数値_内部番号];
437- for (int i = 0; i < CDTXMania.Instance.ConfigIni.nPolyphonicSounds; i++)
437+ for (int i = 0; i < Math.Max(CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB); i++)
438438 {
439439 if (wc.rSound[i] != null)
440440 {
@@ -3257,7 +3257,7 @@ namespace DTXMania
32573257 CDTX.CWAV wc = CDTXMania.Instance.DTX.listWAV[pChip.n整数値_内部番号];
32583258 //Debug.Write( "[AddMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
32593259
3260- for (int i = 0; i < CDTXMania.Instance.ConfigIni.nPolyphonicSounds; i++)
3260+ for (int i = 0; i < Math.Max(CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB); i++)
32613261 {
32623262 if (wc.rSound[i] != null)
32633263 {
@@ -3284,7 +3284,7 @@ namespace DTXMania
32843284 {
32853285 CDTX.CWAV wc = CDTXMania.Instance.DTX.listWAV[pChip.n整数値_内部番号];
32863286 //Debug.Write( "[DelMixer] BAR=" + pChip.n発声位置 / 384 + ", wav=" + Path.GetFileName( wc.strファイル名 ) + ", time=" + pChip.n発声時刻ms );
3287- for (int i = 0; i < CDTXMania.Instance.ConfigIni.nPolyphonicSounds; i++)
3287+ for (int i = 0; i < Math.Max(CDTXMania.Instance.ConfigIni.nPolyphonicSounds, CDTXMania.Instance.ConfigIni.nPolyphonicSoundsGB); i++)
32883288 {
32893289 if (wc.rSound[i] != null)
32903290 {
--- "a/DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"
+++ "b/DTXMania/\343\202\263\343\203\274\343\203\211/\345\205\250\344\275\223/CDTXMania.cs"
@@ -433,6 +433,7 @@ namespace DTXMania
433433
434434 //多重再生数=4
435435 CDTXMania.instance.ConfigIni.nPolyphonicSounds.Value = 4;
436+ CDTXMania.instance.ConfigIni.nPolyphonicSoundsGB.Value = 2;
436437
437438 //再生速度x1
438439 CDTXMania.instance.ConfigIni.nPlaySpeed.Value = 20;