|
|
|
|
@ -82,7 +82,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV
@@ -82,7 +82,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV
|
|
|
|
|
|
|
|
|
|
for (std::size_t i = 0; i < samplesNeeded; ++i, ++begin) |
|
|
|
|
{ |
|
|
|
|
*it++ = Complex(begin->real() / 32768.0, begin->imag() / 32768.0); |
|
|
|
|
*it++ = Complex(begin->real() / 32768.0f, begin->imag() / 32768.0f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// apply fft window (and copy from m_fftBuffer to m_fftIn)
|
|
|
|
|
@ -141,7 +141,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV
@@ -141,7 +141,7 @@ void SpectrumVis::feed(const SampleVector::const_iterator& cbegin, const SampleV
|
|
|
|
|
// not enough samples for FFT - just fill in new data and return
|
|
|
|
|
for(std::vector<Complex>::iterator it = m_fftBuffer.begin() + m_fftBufferFill; begin < end; ++begin) |
|
|
|
|
{ |
|
|
|
|
*it++ = Complex(begin->real() / 32768.0, begin->imag() / 32768.0); |
|
|
|
|
*it++ = Complex(begin->real() / 32768.0f, begin->imag() / 32768.0f); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
m_fftBufferFill += todo; |
|
|
|
|
|