Lines Matching refs:pcm
310 pcm: bytes | bytearray | memoryview | Iterable[float],
317 self, pcm: bytes | bytearray | memoryview, num_bytes: int, bit_depth: int
320 def encode(self, pcm, num_bytes: int, bit_depth: int | None = None) -> bytes: argument
342 pcm_buffer = array.array("f", pcm)
345 if not abs(sum(pcm)) / frame_samples < 2:
352 padding = max(pcm_len * ctypes.sizeof(pcm_t) - len(pcm), 0)
353 pcm_buffer = bytearray(pcm) + bytearray(padding) # type: ignore
361 pcm = (pcm_t * (pcm_len - ich)).from_buffer(pcm_buffer, pcm_offset)
367 ret = self.lib.lc3_encode(encoder, pcm_fmt, pcm, nchannels, len(data), data)
508 pcm = (pcm_t * (pcm_len - ich)).from_buffer(pcm_buffer, pcm_offset)
517 decoder, buf, len(buf), pcm_fmt, pcm, self.num_channels