#include <vector>
#include <ardour/types.h>
+#include <ardour/processor.h>
#include <pbd/fastlog.h>
namespace ARDOUR {
/** Meters peaks on the input and stores them for access.
*/
-class PeakMeter {
+class PeakMeter : public Processor {
public:
- PeakMeter(Session& s) : _session(s) {}
+ PeakMeter(Session& s) : Processor(s, "meter", PreFader) {}
- void setup (const ChanCount& in);
void reset ();
void reset_max ();
-
+
+ bool can_support_io_configuration (const ChanCount& in, ChanCount& out) const { return true; }
+ bool configure_io (ChanCount in, ChanCount out);
+
/** Compute peaks */
- void run (BufferSet& bufs, nframes_t nframes, nframes_t offset=0);
+ void run_in_place (BufferSet& bufs, nframes_t start_frame, nframes_t end_frame, nframes_t nframes, nframes_t offset);
float peak_power (uint32_t n) {
if (n < _visible_peak_power.size()) {
friend class IO;
void meter();
- Session& _session;
std::vector<float> _peak_power;
std::vector<float> _visible_peak_power;
std::vector<float> _max_peak_power;