|
@@ -4,6 +4,7 @@ import { IPostMessage } from "/src/utils/native-message";
|
|
|
import { api_cloudFollowTime, api_cloudToggleFollow } from "/src/helpers/communication";
|
|
|
import { storeData } from "/src/store";
|
|
|
import { audioRecorder } from "./audioRecorder";
|
|
|
+import { handleStartTick } from "/src/view/tick";
|
|
|
|
|
|
export const followData = reactive({
|
|
|
list: [] as any, // 频率列表
|
|
@@ -65,7 +66,14 @@ const onClear = () => {
|
|
|
};
|
|
|
|
|
|
/** 开始跟练 */
|
|
|
-export const handleFollowStart = () => {
|
|
|
+export const handleFollowStart = async () => {
|
|
|
+ // 跟练模式开始前,增加播放系统节拍器
|
|
|
+ const tickend = await handleStartTick();
|
|
|
+ // console.log("🚀 ~ tickend:", tickend)
|
|
|
+ // 节拍器返回false, 取消播放
|
|
|
+ if (!tickend) {
|
|
|
+ return false;
|
|
|
+ }
|
|
|
onClear();
|
|
|
followData.start = true;
|
|
|
followData.index = 0;
|