From dc5b7f4391624874dc41bac6fb5b805263fe0b01 Mon Sep 17 00:00:00 2001 From: yuquanjun Date: Thu, 17 Sep 2026 07:05:04 +0800 Subject: [PATCH] fix(expert): local song no Stop+Start while playing (fret change / re-pick) Co-authored-by: Cursor --- Global/Global.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/Global/Global.c b/Global/Global.c index 7ff2e5d..85e0343 100644 --- a/Global/Global.c +++ b/Global/Global.c @@ -940,18 +940,17 @@ void TM1629_Handle(uint8_t key) { /* 不按 Last_Tm1926D_Key 去重:App 曲目相邻两节可能是同一和弦键, * 松手再按同一键也必须能续奏(与「指板+拨片」一致,拨片本无去重) */ - if (mGuiData[GUI_AUTOBAND_SW].Current || !Band_IsPlaying()) + if (!Band_IsPlaying()) { - /* 本地曲目(App 和弦曲目):段落结束/循环点处仅按指板即续奏下一节。 - * 转主任务走 Pick_Handle,与「指板+拨片」完全等价—— - * 扫描线程内直接 Stop+Start 重启会无声,主任务上下文则正常。 - * Pick_Handle 内会调 Return_Light_buff 通知 App 亮下一节。 */ + /* 段落已停:仅按指板续奏下一节。转主任务走 Pick_Handle + *(与「指板+拨片」等价)。勿在播放中 Stop+Start——本地曲目 + * 中途重启常静音,表现为换把位关音、再按才有声。 */ MainTask_Sendmsg(MSG_ID_BP_KEY, 0, 0, 0); LOG_I("pick", "expert/fret continue chord=%u", (unsigned)KEY_ID_1629); } else { - /* 节奏库播放中:仅换和弦音,不重启段落(说明书:左手切换和弦) */ + /* 播放中(节奏库/本地曲):仅换和弦音,不重启段落 */ uint8_t midi_note_buff[4] = {0,}; uint8_t note_cnt = GetChordNotesByType(KEY_ID_1629,chord_type_index_map[KEY_ID_1629].type,midi_note_buff); for(uint8_t i = 0;i < note_cnt;i++) @@ -1093,7 +1092,14 @@ void Pick_Handle() break; case 1: - /* 首次拨片起奏与后续指板续奏共用同一专业起奏路径 */ + /* 专业:播放中再拨片不 Stop+Start(库会把未消费的 Start 标志清掉 → 静音); + * 本地曲播放中仅换和弦音续播,节奏路径 piece 重启本就安全。 */ + if (Band_IsPlaying() && mGuiData[GUI_AUTOBAND_SW].Current) + { + Accomp_UpdatePlayingChord(); + LOG_I("pick", "expert/pick skip restart playing chord=%u", (unsigned)chord_id); + break; + } Expert_StartWithChord(chord_id, midi_note_buff, note_cnt, "pick"); break; case 0: