Changeset d6befbe


Ignore:
Timestamp:
Apr 21, 2017, 10:19:44 AM (7 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
Children:
21eb4c2
Parents:
9956027
Message:

src/mathutils.c: prevent segfault with latest Accelerate.framework (closes #58, closes #102)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mathutils.c

    r9956027 rd6befbe  
    226226#else
    227227  smpl_t tmp = 0.;
    228   uint_t pos = 0.;
    229   aubio_vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    230 #endif
    231   return pos;
     228  vDSP_Length pos = 0;
     229  aubio_vDSP_minvi(s->data, 1, &tmp, &pos, s->length);
     230#endif
     231  return (uint_t)pos;
    232232}
    233233
     
    244244#else
    245245  smpl_t tmp = 0.;
    246   uint_t pos = 0.;
    247   aubio_vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
    248 #endif
    249   return pos;
     246  vDSP_Length pos = 0;
     247  aubio_vDSP_maxvi(s->data, 1, &tmp, &pos, s->length);
     248#endif
     249  return (uint_t)pos;
    250250}
    251251
Note: See TracChangeset for help on using the changeset viewer.