Skip to content

Commit

Permalink
[音乐盒] 调整加载音乐时优化执行顺序
Browse files Browse the repository at this point in the history
  • Loading branch information
happyme531 committed Aug 1, 2024
1 parent bd61cf6 commit 92afb45
Showing 1 changed file with 11 additions and 13 deletions.
24 changes: 11 additions & 13 deletions 楚留香音乐盒/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,7 @@ function main() {
function loadMusicFile(fileName, loadType) {
//////////////显示加载进度条
let progressDialog = dialogs.build({
title: "加载中",
title: "加载中...",
content: "正在解析文件...",
negative: "取消",
progress: {
Expand Down Expand Up @@ -1808,7 +1808,16 @@ function loadMusicFile(fileName, loadType) {
skipPercussion: true,
}));
pipeline.push(new passes.StoreCurrentNoteTimePass());

//变速
if (speedMultiplier != 1) {
pipeline.push(new passes.SpeedChangePass({
speed: speedMultiplier
}));
}
//合并按键
pipeline.push(new passes.MergeKeyPass({
maxInterval: mergeThreshold,
}));
//伪装手弹
if (humanifyNoteAbsTimeStdDev > 0) {
pipeline.push(new passes.HumanifyPass({
Expand All @@ -1827,7 +1836,6 @@ function loadMusicFile(fileName, loadType) {
pipeline.push(new passes.SingleKeyFrequencyLimitPass({
minInterval: gameProfile.getSameKeyMinInterval()
}));

//跳过前奏
if (readGlobalConfig("skipInit", true)) {
pipeline.push(new passes.SkipIntroPass({}));
Expand All @@ -1836,16 +1844,6 @@ function loadMusicFile(fileName, loadType) {
if (readGlobalConfig("skipBlank5s", true)) {
pipeline.push(new passes.LimitBlankDurationPass({})); //默认5秒
}
//变速
if (speedMultiplier != 1) {
pipeline.push(new passes.SpeedChangePass({
speed: speedMultiplier
}));
}
//合并按键
pipeline.push(new passes.MergeKeyPass({
maxInterval: mergeThreshold,
}));
//限制按键频率
if (limitClickSpeedHz != 0) {
pipeline.push(new passes.NoteFrequencySoftLimitPass({
Expand Down

0 comments on commit 92afb45

Please sign in to comment.