fix: audio in verify_sync
This commit is contained in:
1 parent
02df187139
commit
708a256427
1 file changed
+8
-1
+8
-1
@@ -533,17 +533,24 @@ class VerifyWindow(QtWidgets.QMainWindow):
|
||||
return f"{h:02d}:{m:02d}:{s:06.3f}"
|
||||
|
||||
def _sync_from_mpv(self):
|
||||
"""Poll mpv position and update waveforms."""
|
||||
"""Poll mpv position and play/pause state, update waveforms and audio."""
|
||||
if not self.mpv:
|
||||
return
|
||||
try:
|
||||
t = self.mpv.time_pos
|
||||
paused = self.mpv.paused
|
||||
except Exception:
|
||||
t = 0
|
||||
paused = True
|
||||
if t > self.duration:
|
||||
t = self.duration
|
||||
self._set_pos(t)
|
||||
|
||||
if not paused and not self.playing_a_b:
|
||||
self.start_play()
|
||||
elif paused and self.playing_a_b:
|
||||
self.stop_play()
|
||||
|
||||
def toggle_play(self):
|
||||
if not self.mpv:
|
||||
return
|
||||
|
||||
Reference in new issue
Block a user