Increase accuracy of analyzed true-peak positions
This commit is contained in:
parent
b92de5a2fe
commit
4674dd8534
@ -593,12 +593,18 @@ VampTruePeak::process(const float *const *inputBuffers,
|
|||||||
return FeatureSet();
|
return FeatureSet();
|
||||||
}
|
}
|
||||||
|
|
||||||
_meter.process (inputBuffers[0], m_blockSize);
|
size_t remain = m_blockSize;
|
||||||
|
size_t processed = 0;
|
||||||
|
while (remain > 0) {
|
||||||
|
size_t to_proc = std::min ((size_t)48, remain);
|
||||||
|
_meter.process (&inputBuffers[0][processed], to_proc);
|
||||||
|
processed += to_proc;
|
||||||
|
remain -= to_proc;
|
||||||
|
|
||||||
// TODO optional (not rt safe)
|
|
||||||
if (_meter.read () >= .89125 /* -1dBTP */) {
|
if (_meter.read () >= .89125 /* -1dBTP */) {
|
||||||
long f = Vamp::RealTime::realTime2Frame (timestamp, m_rate);
|
long f = Vamp::RealTime::realTime2Frame (timestamp, m_rate);
|
||||||
_above_m1.values.push_back ((float) f);
|
_above_m1.values.push_back ((float) (f + processed));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return FeatureSet();
|
return FeatureSet();
|
||||||
|
Loading…
Reference in New Issue
Block a user