/third_party/libsnd/src/ |
D | pcm.c | 384 sc2f_array (const signed char *src, int count, float *dest, float normfact) in sc2f_array() argument 386 dest [i] = ((float) src [i]) * normfact ; in sc2f_array() 390 uc2f_array (const unsigned char *src, int count, float *dest, float normfact) in uc2f_array() argument 392 dest [i] = (((int) src [i]) - 128) * normfact ; in uc2f_array() 396 les2f_array (const short *src, int count, float *dest, float normfact) in les2f_array() argument 402 dest [i] = ((float) value) * normfact ; in les2f_array() 407 bes2f_array (const short *src, int count, float *dest, float normfact) in bes2f_array() argument 413 dest [i] = ((float) value) * normfact ; in bes2f_array() 418 let2f_array (const tribyte *src, int count, float *dest, float normfact) in let2f_array() argument 423 dest [i] = ((float) value) * normfact ; in let2f_array() [all …]
|
D | alaw.c | 39 static void alaw2f_array (unsigned char *buffer, int count, float *ptr, float normfact) ; 40 static void alaw2d_array (unsigned char *buffer, int count, double *ptr, double normfact) ; 44 static void f2alaw_array (const float *buffer, int count, unsigned char *ptr, float normfact) ; 45 static void d2alaw_array (const double *buffer, int count, unsigned char *ptr, double normfact) ; 306 alaw2f_array (unsigned char *buffer, int count, float *ptr, float normfact) in alaw2f_array() argument 308 ptr [i] = normfact * alaw_decode [(int) buffer [i]] ; in alaw2f_array() 312 alaw2d_array (unsigned char *buffer, int count, double *ptr, double normfact) in alaw2d_array() argument 314 ptr [i] = normfact * alaw_decode [(int) buffer [i]] ; in alaw2d_array() 340 f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact) in f2alaw_array() argument 343 buffer [i] = alaw_encode [psf_lrintf (normfact * ptr [i])] ; in f2alaw_array() [all …]
|
D | ulaw.c | 807 ulaw2f_array (unsigned char *buffer, int count, float *ptr, float normfact) in ulaw2f_array() argument 809 ptr [i] = normfact * ulaw_decode [(int) buffer [i]] ; in ulaw2f_array() 813 ulaw2d_array (const unsigned char *buffer, int count, double *ptr, double normfact) in ulaw2d_array() argument 815 ptr [i] = normfact * ulaw_decode [(int) buffer [i]] ; in ulaw2d_array() 841 f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact) in f2ulaw_array() argument 844 buffer [i] = ulaw_encode [psf_lrintf (normfact * ptr [i])] ; in f2ulaw_array() 846 buffer [i] = 0x7F & ulaw_encode [- psf_lrintf (normfact * ptr [i])] ; in f2ulaw_array() 851 d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact) in d2ulaw_array() argument 856 buffer [i] = ulaw_encode [psf_lrint (normfact * ptr [i])] ; in d2ulaw_array() 858 buffer [i] = 0x7F & ulaw_encode [- psf_lrint (normfact * ptr [i])] ; in d2ulaw_array() [all …]
|
D | xi.c | 496 static void dsc2f_array (XI_PRIVATE *pxi, signed char *src, int count, float *dest, float normfact)… 497 …ic void dsc2d_array (XI_PRIVATE *pxi, signed char *src, int count, double *dest, double normfact) ; 501 static void dles2f_array (XI_PRIVATE *pxi, short *src, int count, float *dest, float normfact) ; 502 static void dles2d_array (XI_PRIVATE *pxi, short *src, int count, double *dest, double normfact) ; 562 float normfact ; in dpcm_read_dsc2f() local 567 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x80) : 1.0 ; in dpcm_read_dsc2f() 575 dsc2f_array (pxi, ubuf.scbuf, readcount, ptr + total, normfact) ; in dpcm_read_dsc2f() 591 double normfact ; in dpcm_read_dsc2d() local 596 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x80) : 1.0 ; in dpcm_read_dsc2d() 604 dsc2d_array (pxi, ubuf.scbuf, readcount, ptr + total, normfact) ; in dpcm_read_dsc2d() [all …]
|
D | vox_adpcm.c | 209 float normfact ; in vox_read_f() local 215 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in vox_read_f() 223 ptr [total + k] = normfact * (float) (sptr [k]) ; in vox_read_f() 240 double normfact ; in vox_read_d() local 246 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in vox_read_d() 254 ptr [total + k] = normfact * (double) (sptr [k]) ; in vox_read_d() 346 float normfact ; in vox_write_f() local 352 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in vox_write_f() 359 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in vox_write_f() 377 double normfact ; in vox_write_d() local [all …]
|
D | txw.c | 304 float normfact ; in txw_read_f() local 307 normfact = 1.0 / 0x8000 ; in txw_read_f() 309 normfact = 1.0 / 0x10 ; in txw_read_f() 320 ptr [total + k] = normfact * sample ; in txw_read_f() 322 ptr [total + k + 1] = normfact * sample ; in txw_read_f() 340 double normfact ; in txw_read_d() local 343 normfact = 1.0 / 0x8000 ; in txw_read_d() 345 normfact = 1.0 / 0x10 ; in txw_read_d() 356 ptr [total + k] = normfact * sample ; in txw_read_d() 358 ptr [total + k + 1] = normfact * sample ; in txw_read_d()
|
D | flac.c | 1188 { float normfact, scaled_value ; in f2flac8_clip_array() local 1190 normfact = normalize ? (8.0 * 0x10) : 1.0 ; in f2flac8_clip_array() 1193 { scaled_value = src [i] * normfact ; in f2flac8_clip_array() 1210 { float normfact, scaled_value ; in f2flac16_clip_array() local 1212 normfact = normalize ? (8.0 * 0x1000) : 1.0 ; in f2flac16_clip_array() 1215 { scaled_value = src [i] * normfact ; in f2flac16_clip_array() 1230 { float normfact, scaled_value ; in f2flac24_clip_array() local 1232 normfact = normalize ? (8.0 * 0x100000) : 1.0 ; in f2flac24_clip_array() 1235 { scaled_value = src [i] * normfact ; in f2flac24_clip_array() 1253 { float normfact = normalize ? (1.0 * 0x7F) : 1.0 ; in f2flac8_array() local [all …]
|
D | g72x.c | 289 float normfact ; in g72x_read_f() local 295 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in g72x_read_f() 303 ptr [total + k] = normfact * sptr [k] ; in g72x_read_f() 321 double normfact ; in g72x_read_d() local 327 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in g72x_read_d() 335 ptr [total + k] = normfact * (double) (sptr [k]) ; in g72x_read_d() 528 float normfact ; in g72x_write_f() local 534 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x8000) : 1.0 ; in g72x_write_f() 541 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in g72x_write_f() 560 double normfact ; in g72x_write_d() local [all …]
|
D | gsm610.c | 323 float normfact ; in gsm610_read_f() local 329 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in gsm610_read_f() 337 ptr [total + k] = normfact * sptr [k] ; in gsm610_read_f() 352 double normfact ; in gsm610_read_d() local 354 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in gsm610_read_d() 366 ptr [total + k] = normfact * sptr [k] ; in gsm610_read_d() 553 float normfact ; in gsm610_write_f() local 559 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in gsm610_write_f() 566 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in gsm610_write_f() 584 double normfact ; in gsm610_write_d() local [all …]
|
D | dwvw.c | 247 float normfact ; in dwvw_read_f() local 253 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x80000000) : 1.0 ; in dwvw_read_f() 261 ptr [total + k] = normfact * (float) (iptr [k]) ; in dwvw_read_f() 279 double normfact ; in dwvw_read_d() local 285 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x80000000) : 1.0 ; in dwvw_read_d() 293 ptr [total + k] = normfact * (double) (iptr [k]) ; in dwvw_read_d() 618 float normfact ; in dwvw_write_f() local 624 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFFFFFF) : 1.0 ; in dwvw_write_f() 631 iptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in dwvw_write_f() 650 double normfact ; in dwvw_write_d() local [all …]
|
D | common.c | 1678 { float normfact ; in psf_f2s_array() local 1680 normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ; in psf_f2s_array() 1682 dest [i] = psf_lrintf (src [i] * normfact) ; in psf_f2s_array() 1689 { float normfact, scaled_value ; in psf_f2s_clip_array() local 1691 normfact = normalize ? (1.0 * 0x8000) : 1.0 ; in psf_f2s_clip_array() 1694 { scaled_value = src [i] * normfact ; in psf_f2s_clip_array() 1712 { double normfact ; in psf_d2s_array() local 1714 normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ; in psf_d2s_array() 1716 dest [i] = psf_lrint (src [i] * normfact) ; in psf_d2s_array() 1723 { double normfact, scaled_value ; in psf_d2s_clip_array() local [all …]
|
D | sds.c | 600 float normfact ; in sds_read_f() local 607 normfact = 1.0 / 0x80000000 ; in sds_read_f() 609 normfact = 1.0 / (1 << psds->bitwidth) ; in sds_read_f() 617 ptr [total + k] = normfact * iptr [k] ; in sds_read_f() 632 double normfact ; in sds_read_d() local 639 normfact = 1.0 / 0x80000000 ; in sds_read_d() 641 normfact = 1.0 / (1 << psds->bitwidth) ; in sds_read_d() 649 ptr [total + k] = normfact * iptr [k] ; in sds_read_d() 944 float normfact ; in sds_write_f() local 952 normfact = 1.0 * 0x80000000 ; in sds_write_f() [all …]
|
D | ms_adpcm.c | 407 float normfact ; in msadpcm_read_f() local 413 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in msadpcm_read_f() 423 ptr [total + k] = normfact * (float) (sptr [k]) ; in msadpcm_read_f() 439 double normfact ; in msadpcm_read_d() local 445 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in msadpcm_read_d() 455 ptr [total + k] = normfact * (double) (sptr [k]) ; in msadpcm_read_d() 727 float normfact ; in msadpcm_write_f() local 733 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in msadpcm_write_f() 740 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in msadpcm_write_f() 757 double normfact ; in msadpcm_write_d() local [all …]
|
D | paf.c | 583 float normfact ; in paf24_read_f() local 589 normfact = (psf->norm_float == SF_TRUE) ? (1.0 / 0x80000000) : (1.0 / 0x100) ; in paf24_read_f() 597 ptr [total + k] = normfact * iptr [k] ; in paf24_read_f() 611 double normfact ; in paf24_read_d() local 617 normfact = (psf->norm_double == SF_TRUE) ? (1.0 / 0x80000000) : (1.0 / 0x100) ; in paf24_read_d() 625 ptr [total + k] = normfact * iptr [k] ; in paf24_read_d() 764 float normfact ; in paf24_write_f() local 770 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFFFFFF) : (1.0 / 0x100) ; in paf24_write_f() 777 iptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in paf24_write_f() 795 double normfact ; in paf24_write_d() local [all …]
|
D | nms_adpcm.c | 810 float normfact ; in nms_adpcm_read_f() local 816 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in nms_adpcm_read_f() 824 ptr [total + k] = normfact * sptr [k] ; in nms_adpcm_read_f() 842 double normfact ; in nms_adpcm_read_d() local 848 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in nms_adpcm_read_d() 856 ptr [total + k] = normfact * (double) (sptr [k]) ; in nms_adpcm_read_d() 968 float normfact ; in nms_adpcm_write_f() local 974 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x8000) : 1.0 ; in nms_adpcm_write_f() 981 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in nms_adpcm_write_f() 1000 double normfact ; in nms_adpcm_write_d() local [all …]
|
D | ima_adpcm.c | 654 float normfact ; in ima_read_f() local 660 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in ima_read_f() 668 ptr [total + k] = normfact * (float) (sptr [k]) ; in ima_read_f() 685 double normfact ; in ima_read_d() local 691 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in ima_read_d() 699 ptr [total + k] = normfact * (double) (sptr [k]) ; in ima_read_d() 954 float normfact ; in ima_write_f() local 960 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in ima_write_f() 967 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in ima_write_f() 985 double normfact ; in ima_write_d() local [all …]
|
D | mpeg_decode.c | 161 f2d_array (const float *src, int count, double *dest, double normfact) in f2d_array() argument 163 { dest [i] = src [i] * normfact ; in f2d_array() 171 double normfact ; in mpeg_dec_read_d() local 174 normfact = (psf->norm_double == SF_TRUE) ? 1.0 : (1.0 * 0x8000) ; in mpeg_dec_read_d() 181 f2d_array (ubuf.fbuf, readlen, ptr + total, normfact) ; in mpeg_dec_read_d()
|
D | alac.c | 525 float normfact ; in alac_read_f() local 530 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x80000000) : 1.0 ; in alac_read_f() 542 ptr [total + k] = normfact * iptr [k] ; in alac_read_f() 558 double normfact ; in alac_read_d() local 563 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((float) 0x80000000) : 1.0 ; in alac_read_d() 575 ptr [total + k] = normfact * iptr [k] ; in alac_read_d()
|