T3: Autosample UX - fail reason + toast + pre-warm feedback
vstiAutosample: fail map thanh object {ts, reason} (cooldown check
object-aware), recordFail o API-missing/response loi/catch, export
failReasonFor. soundfontPlayer: toast ly do khi ensure null (throttle
10s) roi fallback oscillator. app.jsx: pre-warm VSTi hien thi toast khi
autosample fail.
This commit is contained in:
@@ -15496,7 +15496,13 @@ const App = () => {
|
||||
// VSTi live playback: pre-warm autosample (SF2 backend) — note đầu không bị
|
||||
// delay (SonicSF cũng ensure lazily trong _playNoteFluid nếu chưa có).
|
||||
if (window.SonicVstiAutosample && instrumentId && !isSfInstrument) {
|
||||
window.SonicVstiAutosample.ensure({ plugin_id: instrumentId, type: 'vst3' });
|
||||
const _warmEngine = { plugin_id: instrumentId, type: 'vst3' };
|
||||
window.SonicVstiAutosample.ensure(_warmEngine).then(_sfId => {
|
||||
if (!_sfId && window.SonicVstiAutosample.failReasonFor) {
|
||||
const _reason = window.SonicVstiAutosample.failReasonFor(_warmEngine);
|
||||
if (_reason && window.showToast) window.showToast('Autosample VSTi that bai: ' + _reason + ' - dung am default', 'warning');
|
||||
}
|
||||
});
|
||||
}
|
||||
// Trigger FluidSynth load + program change when soundfont instrument selected
|
||||
if (window.SonicSF && window.SonicSF.selectInstrument && instrumentId && isSfInstrument) {
|
||||
|
||||
Reference in New Issue
Block a user