Add silence padding after transmission breaks

Prevents unwanted interpolation/distortion of audio by sending silence
packets after pausing or ending the audio stream.
This commit is contained in:
Imayhaveborkedit
2023-09-22 03:38:42 -04:00
committed by GitHub
parent 3f92f35bb1
commit 48b4ea84c9
2 changed files with 14 additions and 1 deletions

View File

@ -72,6 +72,8 @@ __all__ = (
_log = logging.getLogger(__name__)
OPUS_SILENCE = b'\xF8\xFF\xFE'
c_int_ptr = ctypes.POINTER(ctypes.c_int)
c_int16_ptr = ctypes.POINTER(ctypes.c_int16)
c_float_ptr = ctypes.POINTER(ctypes.c_float)