Skip to content

Commit db73edb

Browse files
committed
update docs for output_depth
1 parent ef4b32f commit db73edb

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

shared-bindings/audioi2sin/I2SIn.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,12 @@
6969
//| transported in 32-bit slots, so use ``bit_depth=32`` and an ``'I'`` buffer.
7070
//| :param int output_bit_depth: If set, recorded samples are bit-shifted from
7171
//| ``bit_depth`` to this width before being written to the destination buffer
72-
//| (8, 16, 24, or 32). Widening pads the new MSBs with zero; narrowing arithmetic-
73-
//| shifts the value right (sign-preserving when ``samples_signed`` is True). When
74-
//| ``None`` (the default) the destination buffer holds samples at ``bit_depth``.
72+
//| (8, 16, 24, or 32). Widening keeps the value right-justified: for signed
73+
//| samples the new MSBs replicate the sign bit (zeros for positive values, ones
74+
//| for negative), while for unsigned samples the new MSBs are zero. Narrowing
75+
//| arithmetic-shifts the value right (sign-preserving when ``samples_signed`` is
76+
//| True). When ``None`` (the default) the destination buffer holds samples at
77+
//| ``bit_depth``.
7578
//| :param bool mono: True when capturing a single channel of audio, captures two channels otherwise.
7679
//| :param bool left_justified: True when data bits are aligned with the word select clock. False
7780
//| when they are shifted by one to match classic I2S protocol. Set True for mics like the SPH0645LM4H.

0 commit comments

Comments
 (0)