fix a bug were lc3 streams wouldnt stop

This commit is contained in:
2025-03-04 13:42:12 +01:00
parent dc8b6cc66e
commit b8b4c82be0
2 changed files with 6 additions and 1 deletions

View File

@@ -447,8 +447,13 @@ class Streamer():
lc3_frame = bytes(
itertools.islice(big['lc3_frames'], big['lc3_bytes_per_frame'])
)
if lc3_frame == b'': # Not all streams may stop at the same time
stream_finished[i] = True
continue
else:
pcm_frame = await anext(big['audio_input'].frames(big['lc3_frame_samples']), None)
if pcm_frame is None: # Not all streams may stop at the same time
stream_finished[i] = True
continue