Changeset 41b985f for src/spectral/ooura_fft8g.c
- Timestamp:
- Mar 12, 2017, 11:26:24 AM (7 years ago)
- Branches:
- sampler
- Children:
- bde49c4a
- Parents:
- 71f2e5f (diff), 67b6618 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/spectral/ooura_fft8g.c
r71f2e5f r41b985f 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.