fix(piano-roll): loop only on btn + instant stop
- Sub-tab selection loop only active when st.isLooping is true - End-of-playback loop uses st.isLooping, not global isLoopingSelection - SonicSF.stopAll() sets gain 0 and stops oscillators immediately
This commit is contained in:
@@ -170,17 +170,14 @@
|
||||
try {
|
||||
if (entry.gain) {
|
||||
entry.gain.gain.cancelScheduledValues(now);
|
||||
entry.gain.gain.setValueAtTime(entry.gain.gain.value || 0.8, now);
|
||||
entry.gain.gain.linearRampToValueAtTime(0, now + 0.02);
|
||||
entry.gain.gain.setValueAtTime(0, now);
|
||||
}
|
||||
if (entry.osc) {
|
||||
try { entry.osc.stop(now + 0.025); } catch (e) { }
|
||||
try { entry.osc.stop(now); } catch (e) { }
|
||||
}
|
||||
} catch (e) { }
|
||||
});
|
||||
setTimeout(() => {
|
||||
Object.keys(activeOscillators).forEach(k => delete activeOscillators[k]);
|
||||
}, 50);
|
||||
Object.keys(activeOscillators).forEach(k => delete activeOscillators[k]);
|
||||
},
|
||||
|
||||
// Save user SoundFont to IndexedDB via window.SonicStorage
|
||||
|
||||
Reference in New Issue
Block a user