Changeset 8d38841 for src/spectral
- Timestamp:
- Oct 3, 2016, 8:58:22 PM (8 years ago)
- Branches:
- feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, sampler, yinfft+
- Children:
- cf894b1
- Parents:
- 54eba9d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/ooura_fft8g.c
r54eba9d r8d38841 3 3 // - include "aubio_priv.h" (for config.h and types.h) 4 4 // - add missing prototypes 5 // - use COS and SIN macros 5 // - use COS, SIN, and ATAN macros 6 // - add cast to (smpl_t) to avoid float conversion warnings 6 7 // - declare initialization as static 7 8 // - prefix public function with aubio_ooura_ … … 364 365 a[1] = xi; 365 366 } else { 366 a[1] = 0.5 * (a[0] - a[1]);367 a[1] = (smpl_t)0.5 * (a[0] - a[1]); 367 368 a[0] -= a[1]; 368 369 if (n > 4) { … … 693 694 if (nw > 2) { 694 695 nwh = nw >> 1; 695 delta = atan(1.0) / nwh;696 delta = ATAN(1.0) / nwh; 696 697 w[0] = 1; 697 698 w[1] = 0; … … 727 728 if (nc > 1) { 728 729 nch = nc >> 1; 729 delta = atan(1.0) / nch;730 c[0] = cos(delta * nch);731 c[nch] = 0.5 * c[0];730 delta = ATAN(1.0) / nch; 731 c[0] = COS(delta * nch); 732 c[nch] = (smpl_t)0.5 * c[0]; 732 733 for (j = 1; j < nch; j++) { 733 c[j] = 0.5 * cos(delta * j);734 c[nc - j] = 0.5 * sin(delta * j);734 c[j] = (smpl_t)0.5 * COS(delta * j); 735 c[nc - j] = (smpl_t)0.5 * SIN(delta * j); 735 736 } 736 737 } … … 1588 1589 k = n - j; 1589 1590 kk += ks; 1590 wkr = 0.5 - c[nc - kk];1591 wkr = (smpl_t)0.5 - c[nc - kk]; 1591 1592 wki = c[kk]; 1592 1593 xr = a[j] - a[k]; … … 1614 1615 k = n - j; 1615 1616 kk += ks; 1616 wkr = 0.5 - c[nc - kk];1617 wkr = (smpl_t)0.5 - c[nc - kk]; 1617 1618 wki = c[kk]; 1618 1619 xr = a[j] - a[k];
Note: See TracChangeset
for help on using the changeset viewer.