Implemented performance mode

This commit is contained in:
patben8 committed 2026-11-02 23:03:58 +01:00
1 parent 063463efdd
commit 9df73ddcd2
9 files changed
+552 -211

No files matched your search

+12
View File
@@ -378,6 +378,17 @@ export function useDeck({
setCurrent(eng.getPosition())
}
/** Stop playing, if it is (performance mode pauses deck B on the way out). */
const pause = () => {
const eng = playbackRef.current
if (!eng?.playing) return
previewRef.current = null
setPreviewing(false)
eng.pause()
setPlaying(false)
setCurrent(eng.getPosition())
}
// Start a momentary "cue preview" from `start` for holder `id`: play now, and
// remember to stop + return on release (see endPreview) unless it's latched.
const beginPreview = (id: string, start: number) => {
@@ -1361,6 +1372,7 @@ export function useDeck({
slotCount,
slotLabel,
toggle,
pause,
onCuePress,
onCueRelease,
seekManual,