Don't allow to deactivate meter.
authorRobin Gareus <robin@gareus.org>
Thu, 25 Jul 2013 08:59:24 +0000 (10:59 +0200)
committerRobin Gareus <robin@gareus.org>
Thu, 25 Jul 2013 08:59:24 +0000 (10:59 +0200)
before this change:

1) switch to 'custom' meter point,
2) deactivate meter processor.

-> meters does not run regardless of meter-point
-> meter can only be re-nabled in 'custom' mode

libs/ardour/ardour/meter.h
libs/ardour/meter.cc

index 4ac140fd04d75661b66032811888283b5f8d4d78..a4ad8ecff466be7770f093303867c2b8537f31b9 100644 (file)
@@ -75,6 +75,9 @@ public:
        /** Compute peaks */
        void run (BufferSet& bufs, framepos_t start_frame, framepos_t end_frame, pframes_t nframes, bool);
 
+       void activate ()   { }
+       void deactivate () { }
+
        ChanCount input_streams () const { return current_meters; }
        ChanCount output_streams () const { return current_meters; }
 
index 0c23ea168dbd6a39d881b81432751b7af6cbdd3a..26e865bec33f5397e506b803f629fb7db2c4ead7 100644 (file)
@@ -43,6 +43,8 @@ PeakMeter::PeakMeter (Session& s, const std::string& name)
        Iec1ppmdsp::init(s.nominal_frame_rate());
        Iec2ppmdsp::init(s.nominal_frame_rate());
        Vumeterdsp::init(s.nominal_frame_rate());
+       _pending_active = true;
+       _active = true;
 }
 
 PeakMeter::~PeakMeter ()