practice mode working, timestamp is delayed for some reason
This commit is contained in:
committed by
Clément Le Bihan
parent
c08a1a2c74
commit
c1d714e02a
@@ -186,7 +186,7 @@ const PartitionMagic = ({
|
||||
}, [data?.cursors, melodySound.current?._loaded]);
|
||||
|
||||
React.useEffect(() => {
|
||||
if (!shouldPlay) return;
|
||||
if (!shouldPlay && playType != 'practice') return;
|
||||
if (!piano.current || !isPianoLoaded) return;
|
||||
if (!data || data?.cursors.length === 0) return;
|
||||
getCursorToPlay(
|
||||
|
||||
@@ -172,6 +172,7 @@ const PlayView = ({ songId }: PlayViewProps) => {
|
||||
return;
|
||||
}
|
||||
if (data.type == 'step') {
|
||||
console.log(data.timestamp)
|
||||
setTime(data.timestamp)
|
||||
//set idx += 1
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user