mirror of
https://github.com/DJ2LS/FreeDATA
synced 2024-05-14 08:04:33 +00:00
catching audio error when closing headless tnc
This commit is contained in:
parent
f9b0fc7da8
commit
bf1c630977
1 changed files with 18 additions and 15 deletions
|
@ -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):
|
||||
|
|
Loading…
Reference in a new issue