fix: SF2 sound (audio sink FIFO underrun) + VST3 native GUI open + GUI load race
- bridgeAudioNode: ScriptProcessor 4096 drained only 1 of 16 blocks -> ~94% silence; now drains all queued blocks per callback, RING_DEPTH 8->24 - app.jsx: openNativeGUI had NO caller; wire after VST3 loadInstrument OK in track Synth dropdown + Plugin Manager Load Bridge - main.cpp: OPEN_GUI polls up to 10s for LOAD completion (worker thread) before attach - fixes race 'no instrument loaded' - index.html: bump bridgeAudioNode/app.precompiled cache versions
This commit is contained in:
@@ -5725,6 +5725,11 @@ const PluginManagerModal = ({ isOpen, onClose, pluginsData, onInsertInstrument }
|
||||
const ok = await window.NativeBridgeService.loadInstrument(r.path, type, 0);
|
||||
window.showToast && window.showToast(ok ? ('Đã load vào Native Bridge: ' + r.path) : 'Bridge không khả dụng (dev mode?)', ok ? 'success' : 'warning');
|
||||
if (ok) window.SonicAPI.bridgeStatus().then(s => setBridgeStatus(s)).catch(() => {});
|
||||
// Requirement 2: VST3 load → mở native GUI ngay (C++ attach editor vào
|
||||
// cửa sổ bridge tự tạo — control type=4, hwnd=0).
|
||||
if (ok && type === 'VST3' && window.NativeBridgeService.openNativeGUI) {
|
||||
try { await window.NativeBridgeService.openNativeGUI(name); } catch (e) {}
|
||||
}
|
||||
return ok;
|
||||
} catch (err) {
|
||||
window.showToast && window.showToast('Lỗi load bridge: ' + (err.message || err), 'error');
|
||||
@@ -15370,6 +15375,11 @@ const App = () => {
|
||||
if (p) {
|
||||
const ok = await window.NativeBridgeService.loadInstrument(p, btype, bch);
|
||||
console.log('[Bridge] track', trackId, '-> bridge', btype, 'ch', bch, ok ? 'OK' : 'FAIL', p);
|
||||
// Requirement 2: chọn VST3 qua nút Synth → load xong mở native GUI
|
||||
// (C++ attach editor vào cửa sổ bridge tự tạo — control type=4, hwnd=0).
|
||||
if (ok && btype === 'VST3' && window.NativeBridgeService.openNativeGUI) {
|
||||
try { await window.NativeBridgeService.openNativeGUI(instrumentId); } catch (e) {}
|
||||
}
|
||||
}
|
||||
})();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user