fix: thêm CC120 (All Sound Off) vào stopNote

_fluid_synth_noteoff chưa đủ để tắt âm với instrument loop.
Thêm CC120 kill tất cả voices trên channel để note tắt ngay.
This commit is contained in:
2026-07-27 15:20:01 +07:00
parent cdfe88ba76
commit ae6abc3ea5
+2 -3
View File
@@ -305,9 +305,8 @@
stopNote: function (channel, pitch) {
if (channel < 0 || channel > 15) return;
if (_initialized && _fluidModule) {
try {
_fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch);
} catch (e) {}
try { _fluidModule._fluid_synth_noteoff(_synthPtr, channel, pitch); } catch (e) {}
try { _fluidModule._fluid_synth_cc(_synthPtr, channel, 120, 0); } catch (e) {}
}
},