Fix inverted arguments for real distribution

This commit is contained in:
Geraint 2023-05-10 18:40:50 +01:00
parent 92e0b7685d
commit e0231d5267

View File

@ -340,7 +340,7 @@ private:
void processSpectrum(bool newSpectrum, Sample timeFactor) {
timeFactor = std::max<Sample>(timeFactor, 1/maxCleanStretch);
bool randomTimeFactor = (timeFactor > maxCleanStretch);
std::uniform_real_distribution<Sample> timeFactorDist(maxCleanStretch*2 - timeFactor, timeFactor);
std::uniform_real_distribution<Sample> timeFactorDist(maxCleanStretch*2*randomTimeFactor - timeFactor, timeFactor);
if (newSpectrum) {
for (int c = 0; c < channels; ++c) {