Skip to content

Commit

Permalink
Revert "Skip audio buffer check #388"
Browse files Browse the repository at this point in the history
This reverts commit 79ace0c.
  • Loading branch information
mrlt8 committed Aug 6, 2023
1 parent 79ace0c commit 83c96d8
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/wyzecam/iotc.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,14 +593,18 @@ def recv_audio_frames(self, uri: str) -> None:
self.state == WyzeIOTCSessionState.AUTHENTICATION_SUCCEEDED
and self.stream_state.value > 1
):
if (buf := tutk.av_check_audio_buf(*tutav)) < 1:
if buf < 0:
raise tutk.TutkError(buf)
time.sleep(sleep_interval)
continue
errno, frame_data, _ = tutk.av_recv_audio_data(*tutav)
if errno < 0:
if errno in (
tutk.AV_ER_DATA_NOREADY,
tutk.AV_ER_INCOMPLETE_FRAME,
tutk.AV_ER_LOSED_THIS_FRAME,
):
time.sleep(sleep_interval)
continue
warnings.warn(f"Error: {errno=}")
break
Expand Down

0 comments on commit 83c96d8

Please sign in to comment.