danoniplus 42.5.5 → 42.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/js/danoni_main.js CHANGED
@@ -8,7 +8,7 @@
8
8
  *
9
9
  * https://github.com/cwtickle/danoniplus
10
10
  */
11
- const g_version = `Ver 42.5.5`;
11
+ const g_version = `Ver 42.5.6`;
12
12
  const g_revisedDate = `2025/12/30`;
13
13
 
14
14
  // カスタム用バージョン (danoni_custom.js 等で指定可)
@@ -115,6 +115,9 @@ const waitUntilLoaded = () => {
115
115
  // fps(デフォルトは60)
116
116
  let g_fps = 60;
117
117
 
118
+ // プレイ画面再生時の内部スケジューリング用のマージン時間(100ms)
119
+ let g_scheduleLead = 0.1;
120
+
118
121
  // 譜面データの&区切りを有効にするか
119
122
  let g_enableAmpersandSplit = true;
120
123
 
@@ -2353,9 +2356,9 @@ class AudioPlayer {
2353
2356
  /**
2354
2357
  * 再生処理
2355
2358
  * @param {number} _adjustmentTime
2356
- * - 実際の再生開始時間は、scheduleLead + _adjustmentTime から開始される
2359
+ * - 実際の再生開始時間は、g_scheduleLead + _adjustmentTime から開始される
2357
2360
  * - ただしゲーム内での経過時間計算は _adjustmentTime を基準に行う
2358
- * - scheduleLead は安定した再生タイミングを確保するための内部マージン
2361
+ * - g_scheduleLead は安定した再生タイミングを確保するための内部マージン
2359
2362
  */
2360
2363
  play(_adjustmentTime = 0) {
2361
2364
  this._source = this._context.createBufferSource();
@@ -2363,14 +2366,11 @@ class AudioPlayer {
2363
2366
  this._source.playbackRate.value = this.playbackRate;
2364
2367
  this._source.connect(this._gain);
2365
2368
 
2366
- // 内部スケジューリング用のマージン時間(100ms)
2367
- const scheduleLead = 0.1;
2368
-
2369
2369
  // 実際の予約時刻(内部スケジューリング用のマージンを含む)
2370
- const startAt = this._context.currentTime + scheduleLead + _adjustmentTime;
2370
+ const startAt = this._context.currentTime + g_scheduleLead + _adjustmentTime;
2371
2371
  this._source.start(startAt, this._fadeinPosition);
2372
2372
 
2373
- // ゲーム側の論理的開始時刻(scheduleLead を含めない)
2373
+ // ゲーム側の論理的開始時刻(g_scheduleLead を含めない)
2374
2374
  this._startTime = this._context.currentTime + _adjustmentTime;
2375
2375
  }
2376
2376
 
@@ -12892,7 +12892,7 @@ const mainInit = () => {
12892
12892
  // WebAudioAPIが使用できる場合は小数フレーム分だけ音源位置を調整
12893
12893
  if (g_audio instanceof AudioPlayer) {
12894
12894
  const musicStartAdjustment = (g_headerObj.blankFrame - g_stateObj.decimalAdjustment + 1) / g_fps;
12895
- musicStartTime = performance.now() + musicStartAdjustment * 1000;
12895
+ musicStartTime = performance.now() + (musicStartAdjustment + g_scheduleLead) * 1000;
12896
12896
  g_audio.play(musicStartAdjustment);
12897
12897
  }
12898
12898
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "danoniplus",
3
- "version": "42.5.5",
3
+ "version": "42.5.6",
4
4
  "description": "Dancing☆Onigiri (CW Edition) - Web-based Rhythm Game",
5
5
  "main": "./js/danoni_main.js",
6
6
  "scripts": {