comparison data/fft/FFTDataServer.cpp @ 502:bd7c46636bd0

* minor stuff
author Chris Cannam
date Thu, 04 Dec 2008 17:17:06 +0000
parents 83eae5239db6
children 6066bde1c126
comparison
equal deleted inserted replaced
501:ca208281238b 502:bd7c46636bd0
914 MutexLocker locker(&m_writeMutex, 914 MutexLocker locker(&m_writeMutex,
915 "FFTDataServer::getMagnitudesAt: m_writeMutex"); 915 "FFTDataServer::getMagnitudesAt: m_writeMutex");
916 fillColumn(x, true); 916 fillColumn(x, true);
917 } 917 }
918 918
919 float mean = 0.f;
920 for (size_t i = 0; i < count; ++i) { 919 for (size_t i = 0; i < count; ++i) {
921 values[i] = cache->getMagnitudeAt(col, i * step + minbin); 920 values[i] = cache->getMagnitudeAt(col, i * step + minbin);
922 mean += values[i]; 921 }
923 }
924 if (count > 0) mean /= count;
925
926 // std::cerr << "FFTDataServer::getMagnitudeAt: returning " << count << " values of mean " << mean << std::endl;
927 return true; 922 return true;
928 } 923 }
929 924
930 float 925 float
931 FFTDataServer::getNormalizedMagnitudeAt(size_t x, size_t y) 926 FFTDataServer::getNormalizedMagnitudeAt(size_t x, size_t y)