diff options
Diffstat (limited to 'libs/ardour/mix.cc')
-rw-r--r-- | libs/ardour/mix.cc | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/libs/ardour/mix.cc b/libs/ardour/mix.cc index e2096178dd..a32c274b7c 100644 --- a/libs/ardour/mix.cc +++ b/libs/ardour/mix.cc @@ -89,7 +89,7 @@ compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) return current; } -float +void find_peaks (ARDOUR::Sample *buf, nframes_t nframes, float *min, float *max) { long i; @@ -142,25 +142,13 @@ veclib_compute_peak (ARDOUR::Sample *buf, nframes_t nsamples, float current) return f_max(current, tmpmax); } -float +void veclib_find_peaks (ARDOUR::Sample *buf, nframes_t nframes, float *min, float *max) { - // TODO: someone with veclib skills needs to write this one - long i; - float a, b; - - a = *max; - b = *min; - - for (i = 0; i < nframes; i++) - { - a = fmax (buf[i], a); - b = fmin (buf[i], b); - } - - *max = a; - *min = b; + vDSP_maxv (buf, 1, max, nframes); + vDSP_minv (buf, 1, min, nframes); } + void veclib_apply_gain_to_buffer (ARDOUR::Sample *buf, nframes_t nframes, float gain) { |