ref: d6befbec882ec8137291352d3b3d453225fa8c20
parent: 995602795ce1863f07eb0e77c744a25b03982721
author: Paul Brossier <piem@piem.org>
date: Fri Apr 21 06:19:44 EDT 2017
src/mathutils.c: prevent segfault with latest Accelerate.framework (closes #58, closes #102)
--- a/src/mathutils.c
+++ b/src/mathutils.c
@@ -225,10 +225,10 @@
}
#else
smpl_t tmp = 0.;
- uint_t pos = 0.;
- aubio_vDSP_minvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
+ vDSP_Length pos = 0;
+ aubio_vDSP_minvi(s->data, 1, &tmp, &pos, s->length);
#endif
- return pos;
+ return (uint_t)pos;
}
uint_t
@@ -243,10 +243,10 @@
}
#else
smpl_t tmp = 0.;
- uint_t pos = 0.;
- aubio_vDSP_maxvi(s->data, 1, &tmp, (vDSP_Length *)&pos, s->length);
+ vDSP_Length pos = 0;
+ aubio_vDSP_maxvi(s->data, 1, &tmp, &pos, s->length);
#endif
- return pos;
+ return (uint_t)pos;
}
void