changeset 969:a8aed8a85e09

Fix very minor but erroneous non-float-arithmetic
author Chris Cannam
date Wed, 03 Sep 2014 11:06:19 +0100
parents 6b931eeba385
children bfe724787abf
files data/model/FFTModel.cpp
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
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);