fix a bug were lc3 streams wouldnt stop
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -67,7 +67,7 @@ async def send_audio():
|
||||
"""
|
||||
post_data = await request.json
|
||||
try:
|
||||
for key, val in big_conf.items():
|
||||
for key, val in big_conf.items(): #TODO: loop over caster.big_conf directly
|
||||
if key in post_data:
|
||||
val.audio_source = post_data[key].encode('latin-1')
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user