mirror of
https://github.com/projectM-visualizer/projectm.git
synced 2026-02-14 02:15:45 +00:00
Remove unneeded isnan checks
These values would only be nan if the dft yielded nans. This should never happen as long as the sound input isn't something weird, like nan or +-inf.
This commit is contained in:
committed by
Kai Blaschke
parent
e1832f20f5
commit
15d2aa61bc
@ -91,19 +91,6 @@ void BeatDetect::CalculateBeatStatistics()
|
||||
treb = trebInstant / std::max(0.0001f, trebSmoothed.Get());
|
||||
vol = volInstant / std::max(0.0001f, volSmoothed.Get());
|
||||
|
||||
if (std::isnan(treb))
|
||||
{
|
||||
treb = 0.0;
|
||||
}
|
||||
if (std::isnan(mid))
|
||||
{
|
||||
mid = 0.0;
|
||||
}
|
||||
if (std::isnan(bass))
|
||||
{
|
||||
bass = 0.0;
|
||||
}
|
||||
|
||||
trebAtt = .6f * trebAtt + .4f * treb;
|
||||
midAtt = .6f * midAtt + .4f * mid;
|
||||
bassAtt = .6f * bassAtt + .4f * bass;
|
||||
|
||||
Reference in New Issue
Block a user