- vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
- return f_max(current, tmpmax);
+ vDSP_maxmgv(buf, 1, &tmpmax, nsamples);
+ return f_max(current, tmpmax);
+}
+
+void
+veclib_find_peaks (const ARDOUR::Sample * buf, nframes_t nframes, float *min, float *max)
+{
+ vDSP_maxv (const_cast<ARDOUR::Sample*>(buf), 1, max, nframes);
+ vDSP_minv (const_cast<ARDOUR::Sample*>(buf), 1, min, nframes);