Skip to content

Commit

Permalink
Delay audio by 1 second if ahead of video #388
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Jan 9, 2024
1 parent ff514dd commit 7ac3ed4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/wyzecam/iotc.py
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ def _audio_frame_slow(self, frame_info) -> Optional[bool]:

if gap <= -1:
logger.debug(f"[audio] rushing ahead of video.. {gap=}")
time.sleep(abs(gap) % 1)
time.sleep((abs(gap) % 1) + 1)
elif gap >= 1:
logger.debug(f"[audio] dragging behind video.. {gap=}")
self.flush_pipe("audio")
Expand Down

0 comments on commit 7ac3ed4

Please sign in to comment.