Lines Matching refs:bit_depth
193 def _resolve_pcm_format(cls, bit_depth: int | None) -> tuple[
197 match bit_depth:
312 bit_depth: None = None,
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:
338 (pcm_fmt, pcm_t) = self._resolve_pcm_format(bit_depth)
341 if bit_depth is None:
475 self, data: bytes | bytearray | memoryview, bit_depth: None = None
479 def decode(self, data: bytes | bytearray | memoryview, bit_depth: int) -> bytes: ...
482 self, data: bytes | bytearray | memoryview, bit_depth: int | None = None
499 (pcm_fmt, pcm_t) = self._resolve_pcm_format(bit_depth)
522 return array.array("f", pcm_buffer) if bit_depth is None else bytes(pcm_buffer)