mirror of
https://github.com/MrPatben8/konduktor.git
synced 2026-11-27 10:22:51 +01:00
Implemented performance mode
This commit is contained in:
1 parent
063463efdd
commit
9df73ddcd2
9 files changed
+552
-211
No files matched your search
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user