Lines Matching refs:pcm_val
163 st_14linear2ulaw(PyInt16 pcm_val) /* 2's complement (14-bit range) */ in st_14linear2ulaw() argument
170 pcm_val = pcm_val >> 2; in st_14linear2ulaw()
174 if (pcm_val < 0) { in st_14linear2ulaw()
175 pcm_val = -pcm_val; in st_14linear2ulaw()
180 if ( pcm_val > CLIP ) pcm_val = CLIP; /* clip the magnitude */ in st_14linear2ulaw()
181 pcm_val += (BIAS >> 2); in st_14linear2ulaw()
184 seg = search(pcm_val, seg_uend, 8); in st_14linear2ulaw()
193 uval = (unsigned char) (seg << 4) | ((pcm_val >> (seg + 1)) & 0xF); in st_14linear2ulaw()
260 st_linear2alaw(PyInt16 pcm_val) /* 2's complement (13-bit range) */ in st_linear2alaw() argument
267 pcm_val = pcm_val >> 3; in st_linear2alaw()
270 if (pcm_val >= 0) { in st_linear2alaw()
274 pcm_val = -pcm_val - 1; in st_linear2alaw()
278 seg = search(pcm_val, seg_aend, 8); in st_linear2alaw()
287 aval |= (pcm_val >> 1) & QUANT_MASK; in st_linear2alaw()
289 aval |= (pcm_val >> seg) & QUANT_MASK; in st_linear2alaw()