transport(base): clear audio output buffer if interrupted

This commit is contained in:
Aleix Conchillo Flaqué
2024-05-22 16:30:43 -07:00
parent 71ba28753e
commit 34384881bc
3 changed files with 3 additions and 27 deletions

View File

@@ -175,8 +175,7 @@ class BaseOutputTransport(FrameProcessor):
self._internal_push_frame(frame), self.get_event_loop())
future.result()
else:
# Send any remaining audio
self._send_audio_truncated(buffer, bytes_size_10ms)
# If we get interrupted just clear the output buffer.
buffer = bytearray()
if isinstance(frame, EndFrame):