fixed: use the average of only 4 ffts per frame to decrease cpu usage

This commit is contained in:
Bob van Loosen 2013-04-06 00:29:57 +02:00
parent dc35fbd0a1
commit e7a9e0b4df

View file

@ -453,7 +453,7 @@ void CBitVis::ProcessAudio()
m_scopebufpos = 0; m_scopebufpos = 0;
} }
if (m_samplecounter % 128 == 0) if (m_samplecounter % (samplerate / 4 / m_fps) == 0)
{ {
m_fft.ApplyWindow(); m_fft.ApplyWindow();
fftwf_execute(m_fft.m_plan); fftwf_execute(m_fft.m_plan);