Skip to content

Commit 212ce1d

Browse files
committed
voice recv is no longer funny
1 parent fe8e602 commit 212ce1d

File tree

12 files changed

+444
-481
lines changed

12 files changed

+444
-481
lines changed

discord/opus.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -536,10 +536,11 @@ def decode(self, data, *, fec=False):
536536
samples_per_frame = self.packet_get_samples_per_frame(data)
537537
frame_size = frames * samples_per_frame
538538

539-
pcm = (
540-
ctypes.c_int16
541-
* (frame_size * channel_count * ctypes.sizeof(ctypes.c_int16))
542-
)()
539+
# pcm = (
540+
# ctypes.c_int16
541+
# * (frame_size * channel_count * ctypes.sizeof(ctypes.c_int16))
542+
# )()
543+
pcm = (ctypes.c_int16 * (frame_size * channel_count))()
543544
pcm_ptr = ctypes.cast(pcm, c_int16_ptr)
544545

545546
ret = _lib.opus_decode(

0 commit comments

Comments
 (0)