Skip to content

Commit

Permalink
Skip audio buffer check #388
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlt8 committed Jul 29, 2023
1 parent bb6238d commit 79ace0c
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions app/wyzecam/iotc.py
Original file line number Diff line number Diff line change
Expand Up @@ -593,18 +593,14 @@ 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 79ace0c

Please sign in to comment.