1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-09-17 16:50:26 +02:00

Fix summary values for edge cases when overall signal does not straddle zero line.

This commit is contained in:
martynshaw99 2012-05-05 21:45:50 +00:00
parent e4e9549a95
commit f8c81d332a
2 changed files with 8 additions and 6 deletions

View File

@ -448,9 +448,10 @@ void *ODDecodeBlockFile::CalcSummary(samplePtr buffer, sampleCount len,
}
for (i = sumLen; i < mSummaryInfo.frames256; i++) {
summary256[i * 3] = 0.0f;
summary256[i * 3 + 1] = 0.0f;
summary256[i * 3 + 2] = 0.0f;
// filling in the remaining bits with non-harming/contributing values
summary256[i * 3] = FLT_MAX; // min
summary256[i * 3 + 1] = -FLT_MAX; // max
summary256[i * 3 + 2] = 0.0f; // rms
}
// Recalc 64K summaries

View File

@ -519,9 +519,10 @@ void *ODPCMAliasBlockFile::CalcSummary(samplePtr buffer, sampleCount len,
}
for (i = sumLen; i < mSummaryInfo.frames256; i++) {
summary256[i * 3] = 0.0f;
summary256[i * 3 + 1] = 0.0f;
summary256[i * 3 + 2] = 0.0f;
// filling in the remaining bits with non-harming/contributing values
summary256[i * 3] = FLT_MAX; // min
summary256[i * 3 + 1] = -FLT_MAX; // max
summary256[i * 3 + 2] = 0.0f; // rms
}
// Recalc 64K summaries