Lines Matching full:sample
105 static unsigned char linear2ulaw(short sample) in linear2ulaw() argument
127 /* Get the sample into sign-magnitude. */ in linear2ulaw()
128 sign = (sample >> 8) & 0x80; /* set aside the sign */ in linear2ulaw()
130 sample = -sample; /* get magnitude */ in linear2ulaw()
133 sample = sample + BIAS; in linear2ulaw()
134 exponent = exp_lut[(sample >> 7) & 0xFF]; in linear2ulaw()
135 mantissa = (sample >> (exponent + 3)) & 0x0F; in linear2ulaw()
180 * the seven bit sample is the number of every second alaw-sample ordered by
187 * generate table for conversion law from/to 7-bit alaw-like sample *
210 /* spl is the source: the law-sample (converted to alaw) */ in dsp_audio_generate_seven()
214 /* find the 7-bit-sample */ in dsp_audio_generate_seven()
242 s32 sample; in dsp_audio_generate_mix_table() local
248 sample = dsp_audio_law_to_s32[i]; in dsp_audio_generate_mix_table()
249 sample += dsp_audio_law_to_s32[j]; in dsp_audio_generate_mix_table()
250 if (sample > 32767) in dsp_audio_generate_mix_table()
251 sample = 32767; in dsp_audio_generate_mix_table()
252 if (sample < -32768) in dsp_audio_generate_mix_table()
253 sample = -32768; in dsp_audio_generate_mix_table()
255 dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_mix_table()
306 register s32 sample; in dsp_audio_generate_volume_changes() local
329 sample = dsp_audio_law_to_s32[i] * num[0] / denum[0]; in dsp_audio_generate_volume_changes()
330 if (sample < -32768) in dsp_audio_generate_volume_changes()
331 sample = -32768; in dsp_audio_generate_volume_changes()
332 else if (sample > 32767) in dsp_audio_generate_volume_changes()
333 sample = 32767; in dsp_audio_generate_volume_changes()
334 dsp_audio_increase1[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
335 sample = dsp_audio_law_to_s32[i] * num[1] / denum[1]; in dsp_audio_generate_volume_changes()
336 if (sample < -32768) in dsp_audio_generate_volume_changes()
337 sample = -32768; in dsp_audio_generate_volume_changes()
338 else if (sample > 32767) in dsp_audio_generate_volume_changes()
339 sample = 32767; in dsp_audio_generate_volume_changes()
340 dsp_audio_increase2[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
341 sample = dsp_audio_law_to_s32[i] * num[2] / denum[2]; in dsp_audio_generate_volume_changes()
342 if (sample < -32768) in dsp_audio_generate_volume_changes()
343 sample = -32768; in dsp_audio_generate_volume_changes()
344 else if (sample > 32767) in dsp_audio_generate_volume_changes()
345 sample = 32767; in dsp_audio_generate_volume_changes()
346 dsp_audio_increase3[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
347 sample = dsp_audio_law_to_s32[i] * num[3] / denum[3]; in dsp_audio_generate_volume_changes()
348 if (sample < -32768) in dsp_audio_generate_volume_changes()
349 sample = -32768; in dsp_audio_generate_volume_changes()
350 else if (sample > 32767) in dsp_audio_generate_volume_changes()
351 sample = 32767; in dsp_audio_generate_volume_changes()
352 dsp_audio_increase4[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
353 sample = dsp_audio_law_to_s32[i] * num[4] / denum[4]; in dsp_audio_generate_volume_changes()
354 if (sample < -32768) in dsp_audio_generate_volume_changes()
355 sample = -32768; in dsp_audio_generate_volume_changes()
356 else if (sample > 32767) in dsp_audio_generate_volume_changes()
357 sample = 32767; in dsp_audio_generate_volume_changes()
358 dsp_audio_increase5[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
359 sample = dsp_audio_law_to_s32[i] * num[5] / denum[5]; in dsp_audio_generate_volume_changes()
360 if (sample < -32768) in dsp_audio_generate_volume_changes()
361 sample = -32768; in dsp_audio_generate_volume_changes()
362 else if (sample > 32767) in dsp_audio_generate_volume_changes()
363 sample = 32767; in dsp_audio_generate_volume_changes()
364 dsp_audio_increase6[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
365 sample = dsp_audio_law_to_s32[i] * num[6] / denum[6]; in dsp_audio_generate_volume_changes()
366 if (sample < -32768) in dsp_audio_generate_volume_changes()
367 sample = -32768; in dsp_audio_generate_volume_changes()
368 else if (sample > 32767) in dsp_audio_generate_volume_changes()
369 sample = 32767; in dsp_audio_generate_volume_changes()
370 dsp_audio_increase7[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()
371 sample = dsp_audio_law_to_s32[i] * num[7] / denum[7]; in dsp_audio_generate_volume_changes()
372 if (sample < -32768) in dsp_audio_generate_volume_changes()
373 sample = -32768; in dsp_audio_generate_volume_changes()
374 else if (sample > 32767) in dsp_audio_generate_volume_changes()
375 sample = 32767; in dsp_audio_generate_volume_changes()
376 dsp_audio_increase8[i] = dsp_audio_s16_to_law[sample & 0xffff]; in dsp_audio_generate_volume_changes()