Ignore:
Timestamp:
Dec 5, 2018, 10:34:39 PM (5 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/cnn, feature/crepe, feature/pitchshift, feature/timestretch, fix/ffmpeg5, master
Children:
283a619a
Parents:
5b46bc3 (diff), f19db54 (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.
Message:

Merge branch 'master' into feature/pitchshift

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/spectral/ooura_fft8g.c

    r5b46bc3 r633400d  
    33//  - include "aubio_priv.h" (for config.h and types.h)
    44//  - 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
    67//  - declare initialization as static
    78//  - prefix public function with aubio_ooura_
     
    364365        a[1] = xi;
    365366    } else {
    366         a[1] = 0.5 * (a[0] - a[1]);
     367        a[1] = (smpl_t)0.5 * (a[0] - a[1]);
    367368        a[0] -= a[1];
    368369        if (n > 4) {
     
    693694    if (nw > 2) {
    694695        nwh = nw >> 1;
    695         delta = atan(1.0) / nwh;
     696        delta = ATAN(1.0) / nwh;
    696697        w[0] = 1;
    697698        w[1] = 0;
     
    727728    if (nc > 1) {
    728729        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];
    732733        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);
    735736        }
    736737    }
     
    15881589        k = n - j;
    15891590        kk += ks;
    1590         wkr = 0.5 - c[nc - kk];
     1591        wkr = (smpl_t)0.5 - c[nc - kk];
    15911592        wki = c[kk];
    15921593        xr = a[j] - a[k];
     
    16141615        k = n - j;
    16151616        kk += ks;
    1616         wkr = 0.5 - c[nc - kk];
     1617        wkr = (smpl_t)0.5 - c[nc - kk];
    16171618        wki = c[kk];
    16181619        xr = a[j] - a[k];
Note: See TracChangeset for help on using the changeset viewer.