We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4a010f9 commit ac6f13eCopy full SHA for ac6f13e
livekit-rtc/livekit/rtc/audio_frame.py
@@ -59,8 +59,10 @@ def __init__(
59
# can happen if data is bigger than needed
60
raise ValueError("data length must be a multiple of sizeof(int16)")
61
62
+ data = memoryview(data).cast("B")
63
self._data = (ctypes.c_int16 * (len(data) // ctypes.sizeof(ctypes.c_int16)))()
- ctypes.memmove(self._data, bytes(data), len(data))
64
+ ctypes.memmove(self._data, data, len(data))
65
+
66
self._sample_rate = sample_rate
67
self._num_channels = num_channels
68
self._samples_per_channel = samples_per_channel
0 commit comments