/third_party/libsnd/src/ |
D | pcm.c | 383 sc2f_array (const signed char *src, int count, float *dest, float normfact) in sc2f_array() argument 385 dest [count] = ((float) src [count]) * normfact ; in sc2f_array() 389 uc2f_array (const unsigned char *src, int count, float *dest, float normfact) in uc2f_array() argument 391 dest [count] = (((int) src [count]) - 128) * normfact ; in uc2f_array() 395 les2f_array (const short *src, int count, float *dest, float normfact) in les2f_array() argument 401 dest [count] = ((float) value) * normfact ; in les2f_array() 406 bes2f_array (const short *src, int count, float *dest, float normfact) in bes2f_array() argument 412 dest [count] = ((float) value) * normfact ; in bes2f_array() 417 let2f_array (const tribyte *src, int count, float *dest, float normfact) in let2f_array() argument 422 dest [count] = ((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 [count] = normfact * alaw_decode [(int) buffer [count]] ; in alaw2f_array() 312 alaw2d_array (unsigned char *buffer, int count, double *ptr, double normfact) in alaw2d_array() argument 314 ptr [count] = normfact * alaw_decode [(int) buffer [count]] ; in alaw2d_array() 340 f2alaw_array (const float *ptr, int count, unsigned char *buffer, float normfact) in f2alaw_array() argument 343 buffer [count] = alaw_encode [psf_lrintf (normfact * ptr [count])] ; 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 [count] = normfact * ulaw_decode [(int) buffer [count]] ; in ulaw2f_array() 813 ulaw2d_array (const unsigned char *buffer, int count, double *ptr, double normfact) in ulaw2d_array() argument 815 ptr [count] = normfact * ulaw_decode [(int) buffer [count]] ; in ulaw2d_array() 841 f2ulaw_array (const float *ptr, int count, unsigned char *buffer, float normfact) in f2ulaw_array() argument 844 buffer [count] = ulaw_encode [psf_lrintf (normfact * ptr [count])] ; in f2ulaw_array() 846 buffer [count] = 0x7F & ulaw_encode [- psf_lrintf (normfact * ptr [count])] ; in f2ulaw_array() 851 d2ulaw_array (const double *ptr, int count, unsigned char *buffer, double normfact) in d2ulaw_array() argument 856 buffer [count] = ulaw_encode [psf_lrint (normfact * ptr [count])] ; in d2ulaw_array() 858 buffer [count] = 0x7F & ulaw_encode [- psf_lrint (normfact * ptr [count])] ; in d2ulaw_array() [all …]
|
D | xi.c | 502 static void dsc2f_array (XI_PRIVATE *pxi, signed char *src, int count, float *dest, float normfact)… 503 …ic void dsc2d_array (XI_PRIVATE *pxi, signed char *src, int count, double *dest, double normfact) ; 507 static void dles2f_array (XI_PRIVATE *pxi, short *src, int count, float *dest, float normfact) ; 508 static void dles2d_array (XI_PRIVATE *pxi, short *src, int count, double *dest, double normfact) ; 568 float normfact ; in dpcm_read_dsc2f() local 573 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x80) : 1.0 ; in dpcm_read_dsc2f() 581 dsc2f_array (pxi, ubuf.scbuf, readcount, ptr + total, normfact) ; in dpcm_read_dsc2f() 597 double normfact ; in dpcm_read_dsc2d() local 602 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x80) : 1.0 ; in dpcm_read_dsc2d() 610 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 | 1179 { float normfact, scaled_value ; in f2flac8_clip_array() local 1181 normfact = normalize ? (8.0 * 0x10) : 1.0 ; in f2flac8_clip_array() 1184 { scaled_value = src [count] * normfact ; in f2flac8_clip_array() 1201 { float normfact, scaled_value ; in f2flac16_clip_array() local 1203 normfact = normalize ? (8.0 * 0x1000) : 1.0 ; in f2flac16_clip_array() 1206 { scaled_value = src [count] * normfact ; in f2flac16_clip_array() 1221 { float normfact, scaled_value ; in f2flac24_clip_array() local 1223 normfact = normalize ? (8.0 * 0x100000) : 1.0 ; in f2flac24_clip_array() 1226 { scaled_value = src [count] * normfact ; in f2flac24_clip_array() 1244 { 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 | common.c | 1606 { float normfact ; in psf_f2s_array() local 1608 normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ; in psf_f2s_array() 1610 dest [count] = psf_lrintf (src [count] * normfact) ; in psf_f2s_array() 1617 { float normfact, scaled_value ; in psf_f2s_clip_array() local 1619 normfact = normalize ? (1.0 * 0x8000) : 1.0 ; in psf_f2s_clip_array() 1622 { scaled_value = src [count] * normfact ; in psf_f2s_clip_array() 1640 { double normfact ; in psf_d2s_array() local 1642 normfact = normalize ? (1.0 * 0x7FFF) : 1.0 ; in psf_d2s_array() 1644 dest [count] = psf_lrint (src [count] * normfact) ; in psf_d2s_array() 1651 { double normfact, scaled_value ; in psf_d2s_clip_array() 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 | 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 | 401 float normfact ; in msadpcm_read_f() local 407 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in msadpcm_read_f() 417 ptr [total + k] = normfact * (float) (sptr [k]) ; in msadpcm_read_f() 433 double normfact ; in msadpcm_read_d() local 439 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in msadpcm_read_d() 449 ptr [total + k] = normfact * (double) (sptr [k]) ; in msadpcm_read_d() 721 float normfact ; in msadpcm_write_f() local 727 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in msadpcm_write_f() 734 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in msadpcm_write_f() 751 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 | 649 float normfact ; in ima_read_f() local 655 normfact = (psf->norm_float == SF_TRUE) ? 1.0 / ((float) 0x8000) : 1.0 ; in ima_read_f() 663 ptr [total + k] = normfact * (float) (sptr [k]) ; in ima_read_f() 680 double normfact ; in ima_read_d() local 686 normfact = (psf->norm_double == SF_TRUE) ? 1.0 / ((double) 0x8000) : 1.0 ; in ima_read_d() 694 ptr [total + k] = normfact * (double) (sptr [k]) ; in ima_read_d() 949 float normfact ; in ima_write_f() local 955 normfact = (psf->norm_float == SF_TRUE) ? (1.0 * 0x7FFF) : 1.0 ; in ima_write_f() 962 sptr [k] = psf_lrintf (normfact * ptr [total + k]) ; in ima_write_f() 980 double normfact ; in ima_write_d() local [all …]
|
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()
|