fix: audio in verify_sync
This commit is contained in:
1 parent
ccceacdbe4
commit
06dd13d907
1 file changed
+8
-1
+8
-1
@@ -533,17 +533,24 @@ class VerifyWindow(QtWidgets.QMainWindow):
|
|||||||
return f"{h:02d}:{m:02d}:{s:06.3f}"
|
return f"{h:02d}:{m:02d}:{s:06.3f}"
|
||||||
|
|
||||||
def _sync_from_mpv(self):
|
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:
|
if not self.mpv:
|
||||||
return
|
return
|
||||||
try:
|
try:
|
||||||
t = self.mpv.time_pos
|
t = self.mpv.time_pos
|
||||||
|
paused = self.mpv.paused
|
||||||
except Exception:
|
except Exception:
|
||||||
t = 0
|
t = 0
|
||||||
|
paused = True
|
||||||
if t > self.duration:
|
if t > self.duration:
|
||||||
t = self.duration
|
t = self.duration
|
||||||
self._set_pos(t)
|
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):
|
def toggle_play(self):
|
||||||
if not self.mpv:
|
if not self.mpv:
|
||||||
return
|
return
|
||||||
|
|||||||
Reference in new issue
Block a user