13
0

Fix export-analysis true-peak display offset when stripping silence #8578

This commit is contained in:
Robin Gareus 2021-03-21 14:29:37 +01:00
parent 954edb7bd8
commit e6dcc47d4a
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04

View File

@ -259,7 +259,8 @@ Analyser::result ()
for (std::vector<float>::const_iterator i = features[1][0].values.begin();
i != features[1][0].values.end(); ++i) {
const samplecnt_t pk = (*i) / _spp;
/* re-scale - silence stripping: pk = (*i) * peaks / _pos; */
const samplecnt_t pk = (*i) * _n_samples / (_pos * _spp);
const unsigned int cc = c & cmask;
_result.truepeakpos[cc].insert (pk);
}