Changeset ee6ca74 for src/mathutils.c


Ignore:
Timestamp:
Sep 6, 2015, 10:16:26 AM (9 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
50961b9
Parents:
b8c50c3
Message:

src/mathutils.c: use aliases

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    rb8c50c3 ree6ca74  
    2626#include "musicutils.h"
    2727#include "config.h"
    28 
    29 #ifdef HAVE_ACCELERATE
    30 #include <Accelerate/Accelerate.h>
    31 #endif
    3228
    3329/** Window types */
     
    167163  return tmp / (smpl_t) (s->length);
    168164#else
    169 #if !HAVE_AUBIO_DOUBLE
    170   vDSP_meanv(s->data, 1, &tmp, s->length);
    171 #else /* HAVE_AUBIO_DOUBLE */
    172   vDSP_meanvD(s->data, 1, &tmp, s->length);
    173 #endif /* HAVE_AUBIO_DOUBLE */
     165  aubio_vDSP_meanv(s->data, 1, &tmp, s->length);
    174166  return tmp;
    175167#endif /* HAVE_ACCELERATE */
     
    186178  }
    187179#else
    188 #if !HAVE_AUBIO_DOUBLE
    189   vDSP_sve(s->data, 1, &tmp, s->length);
    190 #else /* HAVE_AUBIO_DOUBLE */
    191   vDSP_sveD(s->data, 1, &tmp, s->length);
    192 #endif /* HAVE_AUBIO_DOUBLE */
     180  aubio_vDSP_sve(s->data, 1, &tmp, s->length);
    193181#endif /* HAVE_ACCELERATE */
    194182  return tmp;
     
    206194#else
    207195  smpl_t tmp = 0.;
    208 #if !HAVE_AUBIO_DOUBLE
    209   vDSP_maxv(s->data, 1, &tmp, s->length);
    210 #else
    211   vDSP_maxvD(s->data, 1, &tmp, s->length);
    212 #endif
     196  aubio_vDSP_maxv(s->data, 1, &tmp, s->length);
    213197#endif
    214198  return tmp;
     
    226210#else
    227211  smpl_t tmp = 0.;
    228 #if !HAVE_AUBIO_DOUBLE
    229   vDSP_minv(s->data, 1, &tmp, s->length);
    230 #else
    231   vDSP_minvD(s->data, 1, &tmp, s->length);
    232 #endif
     212  aubio_vDSP_minv(s->data, 1, &tmp, s->length);
    233213#endif
    234214  return tmp;
     
    248228  smpl_t tmp = 0.;
    249229  uint_t pos = 0.;
    250 #if !HAVE_AUBIO_DOUBLE
    251   vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    252 #else
    253   vDSP_minviD(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    254 #endif
     230  aubio_vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    255231#endif
    256232  return pos;
     
    270246  smpl_t tmp = 0.;
    271247  uint_t pos = 0.;
    272 #if !HAVE_AUBIO_DOUBLE
    273   vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    274 #else
    275   vDSP_maxviD(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    276 #endif
     248  aubio_vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    277249#endif
    278250  return pos;
Note: See TracChangeset for help on using the changeset viewer.