Changeset ee6ca74 for src/mathutils.c
- Timestamp:
- Sep 6, 2015, 10:16:26 AM (9 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, pitchshift, sampler, timestretch, yinfft+
- Children:
- 50961b9
- Parents:
- b8c50c3
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mathutils.c
rb8c50c3 ree6ca74 26 26 #include "musicutils.h" 27 27 #include "config.h" 28 29 #ifdef HAVE_ACCELERATE30 #include <Accelerate/Accelerate.h>31 #endif32 28 33 29 /** Window types */ … … 167 163 return tmp / (smpl_t) (s->length); 168 164 #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); 174 166 return tmp; 175 167 #endif /* HAVE_ACCELERATE */ … … 186 178 } 187 179 #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); 193 181 #endif /* HAVE_ACCELERATE */ 194 182 return tmp; … … 206 194 #else 207 195 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); 213 197 #endif 214 198 return tmp; … … 226 210 #else 227 211 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); 233 213 #endif 234 214 return tmp; … … 248 228 smpl_t tmp = 0.; 249 229 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); 255 231 #endif 256 232 return pos; … … 270 246 smpl_t tmp = 0.; 271 247 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); 277 249 #endif 278 250 return pos;
Note: See TracChangeset
for help on using the changeset viewer.