X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fardour%2Fardour%2Fpeak.h;h=9c871a9e35f417bd573bd77a9d6191299e31d4a8;hb=7cc2e8c969e7b778af90f3b45a4c3fa3cbc90ef6;hp=bbec40eea7e65502a36ea0a3b099fdc2e69c1e2f;hpb=449aab3c465bbbf66d221fac3d7ea559f1720357;p=ardour.git diff --git a/libs/ardour/ardour/peak.h b/libs/ardour/ardour/peak.h index bbec40eea7..9c871a9e35 100644 --- a/libs/ardour/ardour/peak.h +++ b/libs/ardour/ardour/peak.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2000-2007 Paul Davis + Copyright (C) 2000-2007 Paul Davis This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -21,16 +21,17 @@ #define __ardour_peak_h__ #include -#include -#include +#include "ardour/libardour_visibility.h" +#include "ardour/types.h" +#include "ardour/utils.h" static inline float -default_compute_peak (const ARDOUR::Sample * const buf, nframes_t nsamples, float current) +default_compute_peak (const ARDOUR::Sample * const buf, ARDOUR::pframes_t nsamples, float current) { - for (nframes_t i = 0; i < nsamples; ++i) { + for (ARDOUR::pframes_t i = 0; i < nsamples; ++i) { current = f_max (current, fabsf (buf[i])); } return current; -} +} #endif /* __ardour_peak_h__ */