diff --git a/include/effect_lib.h b/include/effect_lib.h index 382c3c7c2..13644fe17 100644 --- a/include/effect_lib.h +++ b/include/effect_lib.h @@ -1,7 +1,7 @@ /* * effect_lib.h - library with template-based inline-effects * - * Copyright (c) 2006 Tobias Doerffel + * Copyright (c) 2006-2008 Tobias Doerffel * * This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net * @@ -448,7 +448,7 @@ namespace effectLib // Lou's Hack void setWideCoeff( const float _wideCoeff ) { - m_wideCoeff = static_cast( _wideCoeff ); + m_wideCoeff = _wideCoeff; } int getWideCoeff() @@ -478,7 +478,7 @@ namespace effectLib private: // Lou's Hack - int m_wideCoeff; + float m_wideCoeff; //----------- } ; diff --git a/plugins/spectrum_analyzer/spectrum_analyzer.cpp b/plugins/spectrum_analyzer/spectrum_analyzer.cpp index fda7a1bcb..929a79a7f 100644 --- a/plugins/spectrum_analyzer/spectrum_analyzer.cpp +++ b/plugins/spectrum_analyzer/spectrum_analyzer.cpp @@ -359,8 +359,8 @@ bool spectrumAnalyzer::processAudioBuffer( sampleFrame * _buf, { compressbands( m_absSpecBuf, m_bands, BUFFER_SIZE+1, MAX_BANDS, - LOWEST_FREQ*(BUFFER_SIZE+1)/(float)(sr/2), - HIGHEST_FREQ*(BUFFER_SIZE+1)/(float)(sr/2) ); + (int)(LOWEST_FREQ*(BUFFER_SIZE+1)/(float)(sr/2)), + (int)(HIGHEST_FREQ*(BUFFER_SIZE+1)/(float)(sr/2))); m_energy = maximum( m_bands, MAX_BANDS ) / maximum( m_buffer, BUFFER_SIZE ); } else