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

Addressing one of the problems reported with 'Normalise' if the offset is greater than the signal. Comments on other possible problems.

This commit is contained in:
martynshaw99 2012-04-23 23:39:36 +00:00
parent 4f7e7a5993
commit ffea5a2273
3 changed files with 6 additions and 6 deletions

View File

@ -254,8 +254,8 @@ bool Sequence::GetMinMax(sampleCount start, sampleCount len,
float * outMin, float * outMax) const
{
if (len == 0 || mBlock->GetCount() == 0) {
*outMin = float(0.0);
*outMax = float(0.0);
*outMin = float(0.0); // FLT_MAX? So it doesn't look like a spurious '0' to a caller?
*outMax = float(0.0); // -FLT_MAX? So it doesn't look like a spurious '0' to a caller?
return true;
}

View File

@ -955,8 +955,8 @@ bool WaveClip::GetSpectrogram(float *freq, sampleCount *where,
bool WaveClip::GetMinMax(float *min, float *max,
double t0, double t1)
{
*min = float(0.0);
*max = float(0.0);
*min = float(0.0); // harmless, but unused since Sequence::GetMinMax does not use these values
*max = float(0.0); // harmless, but unused since Sequence::GetMinMax does not use these values
if (t0 > t1)
return false;

View File

@ -1538,8 +1538,8 @@ double WaveTrack::GetEndTime()
bool WaveTrack::GetMinMax(float *min, float *max,
double t0, double t1)
{
*min = float(0.0);
*max = float(0.0);
*min = FLT_MAX;
*max = -FLT_MAX;
if (t0 > t1)
return false;