catching audio error when closing headless tnc

This commit is contained in:
DJ2LS 2022-11-29 07:42:14 +01:00
parent f9b0fc7da8
commit bf1c630977

View file

@ -569,6 +569,7 @@ class RF:
:rtype: int
"""
nbytes = 0
try:
while self.stream.active:
threading.Event().wait(0.01)
while audiobuffer.nbuffer >= nin:
@ -585,6 +586,8 @@ class RF:
self.modem_received_queue.put([bytes_out, freedv, bytes_per_frame])
self.get_scatter(freedv)
self.calculate_snr(freedv)
except Exception as e:
self.log.warning("[MDM] [demod_audio] Stream not active anymore", e=e)
return nin
def init_codec2_mode(self, mode, adv):