From 7133d699062608e72033d4ee4668e9f67237f692 Mon Sep 17 00:00:00 2001 From: Tobias Doerffel Date: Wed, 23 Jul 2008 15:04:30 +0000 Subject: [PATCH] fixed compiler-warnings git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1366 0778d3d1-df1d-0410-868b-ea421aaaa00d --- include/effect_lib.h | 6 +++--- plugins/spectrum_analyzer/spectrum_analyzer.cpp | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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