SpectrumAnalyzer: fixed multiple instantiations
When instantiating the SpectrumAnalyzer plugin more than once the processed data somehow got invalid and caused all but the first SpectrumAnalyzer instance not to work at all. This can be fixed easily by clearing m_buffer in SpectrumAnalyzer's constructor. Closes #3137877.
This commit is contained in:
@@ -56,6 +56,8 @@ spectrumAnalyzer::spectrumAnalyzer( Model * _parent,
|
||||
m_framesFilledUp( 0 ),
|
||||
m_energy( 0 )
|
||||
{
|
||||
memset( m_buffer, 0, sizeof( m_buffer ) );
|
||||
|
||||
m_specBuf = (fftwf_complex *) fftwf_malloc( ( FFT_BUFFER_SIZE + 1 ) *
|
||||
sizeof( fftwf_complex ) );
|
||||
m_fftPlan = fftwf_plan_dft_r2c_1d( FFT_BUFFER_SIZE*2, m_buffer,
|
||||
|
||||
Reference in New Issue
Block a user