Fix assertion failure on dropping a track out of rec-arm.
git-svn-id: svn://localhost/ardour2/branches/3.0@6393 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
@@ -71,6 +71,9 @@ public:
|
||||
/** Compute peaks */
|
||||
void run (BufferSet& bufs, sframes_t start_frame, sframes_t end_frame, nframes_t nframes, bool);
|
||||
|
||||
ChanCount input_streams () const { return current_meters; }
|
||||
ChanCount output_streams () const { return current_meters; }
|
||||
|
||||
float peak_power (uint32_t n) {
|
||||
if (n < _visible_peak_power.size()) {
|
||||
return _visible_peak_power[n];
|
||||
@@ -92,7 +95,7 @@ public:
|
||||
private:
|
||||
friend class IO;
|
||||
|
||||
uint32_t current_meters;
|
||||
ChanCount current_meters;
|
||||
|
||||
std::vector<float> _peak_power;
|
||||
std::vector<float> _visible_peak_power;
|
||||
|
||||
@@ -36,7 +36,7 @@ PBD::Signal0<void> Metering::Meter;
|
||||
PeakMeter::PeakMeter (Session& s, const XMLNode& node)
|
||||
: Processor (s, node)
|
||||
{
|
||||
current_meters = 0;
|
||||
|
||||
}
|
||||
|
||||
/** Get peaks from @a bufs
|
||||
@@ -119,7 +119,7 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
|
||||
return false;
|
||||
}
|
||||
|
||||
current_meters = in.n_total ();
|
||||
current_meters = in;
|
||||
|
||||
return Processor::configure_io (in, out);
|
||||
}
|
||||
@@ -127,7 +127,7 @@ PeakMeter::configure_io (ChanCount in, ChanCount out)
|
||||
void
|
||||
PeakMeter::reflect_inputs (const ChanCount& in)
|
||||
{
|
||||
current_meters = in.n_total ();
|
||||
current_meters = in;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -166,7 +166,7 @@ PeakMeter::meter ()
|
||||
|
||||
assert(_visible_peak_power.size() == _peak_power.size());
|
||||
|
||||
const size_t limit = min (_peak_power.size(), (size_t) current_meters);
|
||||
const size_t limit = min (_peak_power.size(), (size_t) current_meters.n_total ());
|
||||
|
||||
for (size_t n = 0; n < limit; ++n) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user