danoniplus 39.8.9 → 39.8.10
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 +19 -4
- package/package.json +1 -1
package/js/danoni_main.js
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*
|
|
9
9
|
* https://github.com/cwtickle/danoniplus
|
|
10
10
|
*/
|
|
11
|
-
const g_version = `Ver 39.8.
|
|
12
|
-
const g_revisedDate = `2025/
|
|
11
|
+
const g_version = `Ver 39.8.10`;
|
|
12
|
+
const g_revisedDate = `2025/12/30`;
|
|
13
13
|
|
|
14
14
|
// カスタム用バージョン (danoni_custom.js 等で指定可)
|
|
15
15
|
let g_localVersion = ``;
|
|
@@ -2159,13 +2159,28 @@ class AudioPlayer {
|
|
|
2159
2159
|
this._eventListeners[`canplaythrough`]?.forEach(_listener => _listener());
|
|
2160
2160
|
}
|
|
2161
2161
|
|
|
2162
|
+
/**
|
|
2163
|
+
* 再生処理
|
|
2164
|
+
* @param {number} _adjustmentTime
|
|
2165
|
+
* - 実際の再生開始時間は、scheduleLead + _adjustmentTime から開始される
|
|
2166
|
+
* - ただしゲーム内での経過時間計算は _adjustmentTime を基準に行う
|
|
2167
|
+
* - scheduleLead は安定した再生タイミングを確保するための内部マージン
|
|
2168
|
+
*/
|
|
2162
2169
|
play(_adjustmentTime = 0) {
|
|
2163
2170
|
this._source = this._context.createBufferSource();
|
|
2164
2171
|
this._source.buffer = this._buffer;
|
|
2165
2172
|
this._source.playbackRate.value = this.playbackRate;
|
|
2166
2173
|
this._source.connect(this._gain);
|
|
2167
|
-
|
|
2168
|
-
|
|
2174
|
+
|
|
2175
|
+
// 内部スケジューリング用のマージン時間(100ms)
|
|
2176
|
+
const scheduleLead = 0.1;
|
|
2177
|
+
|
|
2178
|
+
// 実際の予約時刻(内部スケジューリング用のマージンを含む)
|
|
2179
|
+
const startAt = this._context.currentTime + scheduleLead + _adjustmentTime;
|
|
2180
|
+
this._source.start(startAt, this._fadeinPosition);
|
|
2181
|
+
|
|
2182
|
+
// ゲーム側の論理的開始時刻(scheduleLead を含めない)
|
|
2183
|
+
this._startTime = this._context.currentTime + _adjustmentTime;
|
|
2169
2184
|
}
|
|
2170
2185
|
|
|
2171
2186
|
pause() {
|