fix: instrument change keeps loop playback alive
This commit is contained in:
@@ -6450,10 +6450,13 @@ const App = () => {
|
||||
stopAllPlayback();
|
||||
setTimeout(() => {
|
||||
const context = getAudioContext();
|
||||
startOffsetTimeRef.current = playingSub.currentTime || 0;
|
||||
const offset = playingSub.currentTime || 0;
|
||||
startOffsetTimeRef.current = offset;
|
||||
startAudioTimeRef.current = context.currentTime;
|
||||
schedulePianoRollMidi(playingSub, playingSub.currentTime || 0);
|
||||
startSubTabPlayback(playingSub, playingSub.currentTime || 0);
|
||||
startBufferOffsetRef.current = offset * (playingSub.speed || 1.0);
|
||||
schedulePianoRollMidi(playingSub, offset);
|
||||
startSubTabPlayback(playingSub, offset);
|
||||
animationFrameIdRef.current = requestAnimationFrame(updatePlayhead);
|
||||
}, 50);
|
||||
}
|
||||
setTimeout(() => lucide.createIcons(), 50);
|
||||
|
||||
Reference in New Issue
Block a user