From ecb328655021135a1fd5d2bb612c016a17bb6f62 Mon Sep 17 00:00:00 2001 From: kazukokawagawa <2580099704@qq.com> Date: Wed, 18 Feb 2026 21:09:45 +0800 Subject: [PATCH 1/4] =?UTF-8?q?chore:=20=E5=B0=86=20@electron/node-gyp=20?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E4=BB=8E=20git=20=E5=8D=8F=E8=AE=AE=E6=9B=B4?= =?UTF-8?q?=E6=94=B9=E4=B8=BA=20https=20tarball?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 更新 pnpm-lock.yaml 中 @electron/node-gyp 包的解析方式,从 git+https 协议切换到 https tarball 链接,以提高依赖下载的可靠性和兼容性。 --- pnpm-lock.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c370d6570..73e3381d7 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -525,8 +525,8 @@ packages: resolution: {integrity: sha512-F+nKc0xW+kVbBRhFzaMgPy3KwmuNTYX1fx6+FxxoSnNgwYX6LD7AKBTWkU0MQ6IBoe7dz069CNkR673sPAgkCQ==} engines: {node: '>=14'} - '@electron/node-gyp@git+https://git@github.com:electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2': - resolution: {commit: 06b29aafb7708acef8b3669835c8a7857ebc92d2, repo: git@github.com:electron/node-gyp.git, type: git} + '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': + resolution: {tarball: https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2} version: 10.2.0-electron.1 engines: {node: '>=12.13.0'} hasBin: true @@ -6141,7 +6141,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@electron/node-gyp@git+https://git@github.com:electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2': + '@electron/node-gyp@https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2': dependencies: env-paths: 2.2.1 exponential-backoff: 3.1.3 @@ -6189,7 +6189,7 @@ snapshots: '@electron/rebuild@3.7.0': dependencies: - '@electron/node-gyp': git+https://git@github.com:electron/node-gyp.git#06b29aafb7708acef8b3669835c8a7857ebc92d2 + '@electron/node-gyp': https://codeload.github.com/electron/node-gyp/tar.gz/06b29aafb7708acef8b3669835c8a7857ebc92d2 '@malept/cross-spawn-promise': 2.0.0 chalk: 4.1.2 debug: 4.4.3 From b74a89fc159577d4a5d6fd08f568675f25e68a4c Mon Sep 17 00:00:00 2001 From: kazukokawagawa <2580099704@qq.com> Date: Wed, 18 Feb 2026 21:28:33 +0800 Subject: [PATCH 2/4] =?UTF-8?q?refactor(store):=20=E7=A7=BB=E9=99=A4?= =?UTF-8?q?=E9=87=8D=E5=A4=8D=E7=9A=84=E7=8A=B6=E6=80=81=E5=B1=9E=E6=80=A7?= =?UTF-8?q?=E5=B9=B6=E6=B7=BB=E5=8A=A0=E8=BF=9B=E5=BA=A6=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除 automixFxSeq 和 automixEndedSeq 的重复定义,这些属性已在初始状态中声明。 新增 progress 属性以支持播放进度跟踪。 --- src/stores/status.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/stores/status.ts b/src/stores/status.ts index 8b9627ac5..c43dfd21b 100644 --- a/src/stores/status.ts +++ b/src/stores/status.ts @@ -183,6 +183,7 @@ export const useStatusStore = defineStore("status", { automixEndedSeq: 0, currentTime: 0, duration: 0, + progress: 0, currentTimeOffsetMap: {}, songCoverTheme: {}, pureLyricMode: false, @@ -247,8 +248,6 @@ export const useStatusStore = defineStore("status", { pointB: null, }, playlistMode: "online", - automixFxSeq: 0, - automixEndedSeq: 0, }), getters: { // 播放音量图标 From 9f475d5173002460a7f798fb90a5ce568e58a581 Mon Sep 17 00:00:00 2001 From: kazukokawagawa <2580099704@qq.com> Date: Wed, 18 Feb 2026 21:40:23 +0800 Subject: [PATCH 3/4] =?UTF-8?q?fix(=E9=9F=B3=E9=A2=91=E6=92=AD=E6=94=BE?= =?UTF-8?q?=E5=99=A8):=20=E4=BF=AE=E5=A4=8D=E5=8A=A0=E8=BD=BD=E6=97=B6?= =?UTF-8?q?=E6=9A=82=E5=81=9C=E7=8A=B6=E6=80=81=E4=B8=8D=E4=B8=80=E8=87=B4?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 在加载新音频源时,确保音频上下文和Web Worker的暂停状态同步。暂停运行中的音频上下文,并通知Worker暂停处理,避免加载过程中的音频播放异常。 --- .../audio-player/ffmpeg-engine/FFmpegAudioPlayer.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/core/audio-player/ffmpeg-engine/FFmpegAudioPlayer.ts b/src/core/audio-player/ffmpeg-engine/FFmpegAudioPlayer.ts index d70c64d34..6dbc16fa1 100644 --- a/src/core/audio-player/ffmpeg-engine/FFmpegAudioPlayer.ts +++ b/src/core/audio-player/ffmpeg-engine/FFmpegAudioPlayer.ts @@ -157,6 +157,9 @@ export class FFmpegAudioPlayer extends BaseAudioPlayer { this.dispatch("loadstart"); this.init(); + if (this.audioCtx && this.audioCtx.state === "running") { + await this.audioCtx.suspend().catch(() => undefined); + } try { if (this.worker) { @@ -186,6 +189,10 @@ export class FFmpegAudioPlayer extends BaseAudioPlayer { file: file, chunkSize: 4096 * 8, }); + this.isWorkerPaused = true; + await this.requestWorker({ type: "PAUSE" }).catch(() => { + this.isWorkerPaused = false; + }); } else { await this.loadSrc(url as string); } @@ -233,6 +240,10 @@ export class FFmpegAudioPlayer extends BaseAudioPlayer { this.runFetchLoop(url, 0, this.fileSize); await initWorkerPromise; + this.isWorkerPaused = true; + await this.requestWorker({ type: "PAUSE" }).catch(() => { + this.isWorkerPaused = false; + }); } catch (e) { const err = toError(e); console.error("[Player] LoadSrc error:", err); From ca20cfc1faeca37836bccf004538f08949cb37ba Mon Sep 17 00:00:00 2001 From: kazukokawagawa <2580099704@qq.com> Date: Wed, 18 Feb 2026 21:41:52 +0800 Subject: [PATCH 4/4] =?UTF-8?q?refactor(stores):=20=E8=B0=83=E6=95=B4?= =?UTF-8?q?=E7=8A=B6=E6=80=81=E5=AD=98=E5=82=A8=E4=B8=AD=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=A1=BA=E5=BA=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 将 automixFxSeq 和 automixEndedSeq 字段移至状态对象末尾,以改善代码组织结构和可读性。 --- src/stores/status.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/status.ts b/src/stores/status.ts index c43dfd21b..f53d96a89 100644 --- a/src/stores/status.ts +++ b/src/stores/status.ts @@ -179,8 +179,6 @@ export const useStatusStore = defineStore("status", { playListShow: false, showFullPlayer: false, playerMetaShow: true, - automixFxSeq: 0, - automixEndedSeq: 0, currentTime: 0, duration: 0, progress: 0, @@ -248,6 +246,8 @@ export const useStatusStore = defineStore("status", { pointB: null, }, playlistMode: "online", + automixFxSeq: 0, + automixEndedSeq: 0, }), getters: { // 播放音量图标