fix(expert): local song no Stop+Start while playing (fret change / re-pick)
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
1201d9f9d0
commit
dc5b7f4391
|
|
@ -940,18 +940,17 @@ void TM1629_Handle(uint8_t key)
|
||||||
{
|
{
|
||||||
/* 不按 Last_Tm1926D_Key 去重:App 曲目相邻两节可能是同一和弦键,
|
/* 不按 Last_Tm1926D_Key 去重:App 曲目相邻两节可能是同一和弦键,
|
||||||
* 松手再按同一键也必须能续奏(与「指板+拨片」一致,拨片本无去重) */
|
* 松手再按同一键也必须能续奏(与「指板+拨片」一致,拨片本无去重) */
|
||||||
if (mGuiData[GUI_AUTOBAND_SW].Current || !Band_IsPlaying())
|
if (!Band_IsPlaying())
|
||||||
{
|
{
|
||||||
/* 本地曲目(App 和弦曲目):段落结束/循环点处仅按指板即续奏下一节。
|
/* 段落已停:仅按指板续奏下一节。转主任务走 Pick_Handle
|
||||||
* 转主任务走 Pick_Handle,与「指板+拨片」完全等价——
|
*(与「指板+拨片」等价)。勿在播放中 Stop+Start——本地曲目
|
||||||
* 扫描线程内直接 Stop+Start 重启会无声,主任务上下文则正常。
|
* 中途重启常静音,表现为换把位关音、再按才有声。 */
|
||||||
* Pick_Handle 内会调 Return_Light_buff 通知 App 亮下一节。 */
|
|
||||||
MainTask_Sendmsg(MSG_ID_BP_KEY, 0, 0, 0);
|
MainTask_Sendmsg(MSG_ID_BP_KEY, 0, 0, 0);
|
||||||
LOG_I("pick", "expert/fret continue chord=%u", (unsigned)KEY_ID_1629);
|
LOG_I("pick", "expert/fret continue chord=%u", (unsigned)KEY_ID_1629);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* 节奏库播放中:仅换和弦音,不重启段落(说明书:左手切换和弦) */
|
/* 播放中(节奏库/本地曲):仅换和弦音,不重启段落 */
|
||||||
uint8_t midi_note_buff[4] = {0,};
|
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);
|
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++)
|
for(uint8_t i = 0;i < note_cnt;i++)
|
||||||
|
|
@ -1093,7 +1092,14 @@ void Pick_Handle()
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 1:
|
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");
|
Expert_StartWithChord(chord_id, midi_note_buff, note_cnt, "pick");
|
||||||
break;
|
break;
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue