[Summary] If Float values are compared as difference, module of this difference should be taken

[Reviewed by] YPozdnyakov
This commit is contained in:
GZharun 2015-05-07 14:55:00 +03:00
parent 0964672cd9
commit ed993ce23a
2 changed files with 2 additions and 2 deletions

View file

@ -1006,7 +1006,7 @@ WTErr WCMRCoreAudioDevice::SetAndCheckCurrentSamplingRate (int newRate)
bool found = false;
for(int i = 0; gAllSampleRates[i] > 0; i++)
{
if (gAllSampleRates[i] - actualSamplingRate < 0.01) {
if (fabs(gAllSampleRates[i] - actualSamplingRate) < 0.01) {
found = true;
}
}