diff data/model/FFTModel.cpp @ 969:a8aed8a85e09

Fix very minor but erroneous non-float-arithmetic
author Chris Cannam
date Wed, 03 Sep 2014 11:06:19 +0100
parents 59e7fe1b1003
children cc27f35aa75c
line wrap: on
line diff
--- a/data/model/FFTModel.cpp	Wed Sep 03 11:04:41 2014 +0100
+++ b/data/model/FFTModel.cpp	Wed Sep 03 11:06:19 2014 +0100
@@ -381,7 +381,7 @@
     if (bin == 0) return 3;
 
     int fftSize = m_server->getFFTSize() >> m_yshift;
-    float binfreq = (sampleRate * bin) / fftSize;
+    float binfreq = (float(sampleRate) * bin) / fftSize;
     float hifreq = Pitch::getFrequencyForPitch(73, 0, binfreq);
 
     int hibin = lrintf((hifreq * fftSize) / sampleRate);