Home
last modified time | relevance | path

Searched refs:bit_depth (Results 1 – 4 of 4) sorted by relevance

/liblc3-latest/python/tests/
Dbasic_test.py7 def test_decode_with_bit_depth(bit_depth, decoded_length) -> None: argument
9 decoded_frame = decoder.decode(bytes(120), bit_depth=bit_depth)
25 decoder.decode(bytes(120), bit_depth=128)
29 def test_encode_with_bit_depth(bit_depth) -> None: argument
31 encoded_frame = encoder.encode(bytes(1920), num_bytes=120, bit_depth=bit_depth)
39 encoded_frame = encoder.encode(pcm, num_bytes=120, bit_depth=None)
47 encoder.encode(bytes(1920), num_bytes=120, bit_depth=128)
/liblc3-latest/python/tools/
Ddecoder.py61 bit_depth = args.bit_depth variable
62 pcm_size = nchannels * (bit_depth // 8)
67 wavfile.setsampwidth(bit_depth // 8)
83 pcm = dec.decode(f_lc3.read(lc3_frame_size), bit_depth=bit_depth)
Dencoder.py54 bit_depth = wavfile.getsampwidth() * 8 variable
80 f_lc3.write(enc.encode(pcm, frame_size, bit_depth=bit_depth))
/liblc3-latest/python/
Dlc3.py193 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
[all …]