liushengqiang преди 2 години
родител
ревизия
d08b2dc284
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      src/page-instrument/view-figner/index.tsx

+ 3 - 0
src/page-instrument/view-figner/index.tsx

@@ -77,6 +77,9 @@ export default defineComponent({
 			// console.log("🚀 ~ item:", item);
 			const noteAudio = data.soundFonts[item.realKey];
 			if (type === "start") {
+				if (data.realKey) {
+					data.soundFonts[data.realKey].stop();
+				}
 				data.realKey = item.realKey;
 				if (noteAudio) {
 					noteAudio.play();