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:
@@ -9529,7 +9529,7 @@ const App = () => {
|
||||
const bufferPos = startBufferOffsetRef.current + elapsed * speedFactor;
|
||||
|
||||
// Loop sub-tab selection (bufferPos is buffer-time)
|
||||
if (st.selectionStart !== null && st.selectionEnd !== null && st.selectionStart !== st.selectionEnd && (st.isLooping || isLoopingSelection)) {
|
||||
if (st.selectionStart !== null && st.selectionEnd !== null && st.selectionStart !== st.selectionEnd && st.isLooping) {
|
||||
const start = Math.min(st.selectionStart, st.selectionEnd);
|
||||
const end = Math.max(st.selectionStart, st.selectionEnd);
|
||||
if (bufferPos >= end) {
|
||||
@@ -9559,7 +9559,7 @@ const App = () => {
|
||||
})() : st.buffer.duration;
|
||||
if (bufferPos >= effectiveDuration) {
|
||||
stopAllPlayback();
|
||||
if (isLoopingSelection) {
|
||||
if (st.isLooping) {
|
||||
setSubTabs(prev => prev.map(s => s.id === activeTabRef.current ? {
|
||||
...s,
|
||||
currentTime: 0,
|
||||
|
||||
Reference in New Issue
Block a user