From ae6abc3ea55b99522aa7dcfd4e18e17c443ceaf1 Mon Sep 17 00:00:00 2001 From: 3dtours Date: Mon, 27 Jul 2026 15:20:01 +0700 Subject: [PATCH] =?UTF-8?q?fix:=20th=C3=AAm=20CC120=20(All=20Sound=20Off)?= =?UTF-8?q?=20v=C3=A0o=20stopNote?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit _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. --- app/static/js/services/soundfontPlayer.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/static/js/services/soundfontPlayer.js b/app/static/js/services/soundfontPlayer.js index 3144788..7a128ec 100644 --- a/app/static/js/services/soundfontPlayer.js +++ b/app/static/js/services/soundfontPlayer.js @@ -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) {} } },