File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -269,7 +269,6 @@ export function useTransport() {
269269 const { stopRecording, onLoopCycle } = useRecording ( ) ;
270270 const mainView = useUIStore ( ( s ) => s . mainView ) ;
271271 const scrubClipsRef = useRef < TimelineScrubClip [ ] > ( [ ] ) ;
272- const lastEndedAtRef = useRef ( 0 ) ;
273272
274273 const play = useCallback ( async ( fromTime ?: number ) => {
275274 const engine = getAudioEngine ( ) ;
@@ -1095,9 +1094,6 @@ export function useTransport() {
10951094 const engine = getAudioEngine ( ) ;
10961095 const bridge = getAudioBridge ( engine ) ;
10971096 const onEnded = ( ) => {
1098- const now = Date . now ( ) ;
1099- if ( now - lastEndedAtRef . current < 250 ) return ;
1100- lastEndedAtRef . current = now ;
11011097 const {
11021098 loopEnabled,
11031099 isRecording,
@@ -1120,7 +1116,10 @@ export function useTransport() {
11201116 useTransportStore . getState ( ) . stop ( ) ;
11211117 }
11221118 } ;
1123- engine . setOnEndedCallback ( onEnded ) ;
1119+ engine . setOnEndedCallback ( ( ) => {
1120+ if ( bridge . backend === 'tauri' && getTauriPlaybackClockOwner ( ) === 'native' ) return ;
1121+ onEnded ( ) ;
1122+ } ) ;
11241123 if ( bridge . backend === 'tauri' ) {
11251124 bridge . setOnEndedCallback ( onEnded ) ;
11261125 }
You can’t perform that action at this time.
0 commit comments