fixed compiler warnings

git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1325 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
Tobias Doerffel
2008-07-18 10:08:37 +00:00
parent 7ed9d07443
commit cd2f51b05b
3 changed files with 8 additions and 8 deletions

View File

@@ -246,7 +246,7 @@ void bitInvader::normalize( void )
// analyze
float max = 0;
const float* samples = m_graph.samples();
for (unsigned int i=0; i < m_graph.length(); i++)
for(int i=0; i < m_graph.length(); i++)
{
if (fabsf(samples[i]) > max) { max = fabs(samples[i]); }
}

View File

@@ -105,7 +105,8 @@ sf2Instrument::sf2Instrument( instrumentTrack * _instrument_track ) :
m_settings = new_fluid_settings();
fluid_settings_setint( m_settings, "audio.period-size", engine::getMixer()->framesPerPeriod() );
fluid_settings_setint( m_settings, (char *) "audio.period-size",
engine::getMixer()->framesPerPeriod() );
// This is just our starting instance of synth. It is recreated
// everytime we load a new soundfont.
@@ -409,9 +410,10 @@ void sf2Instrument::updateSampleRate( void )
double tempRate;
// Set & get, returns the true sample rate
fluid_settings_setnum( m_settings, "synth.sample-rate",
fluid_settings_setnum( m_settings, (char *) "synth.sample-rate",
engine::getMixer()->processingSampleRate() );
fluid_settings_getnum( m_settings, "synth.sample-rate", &tempRate );
fluid_settings_getnum( m_settings, (char *) "synth.sample-rate",
&tempRate );
m_internalSampleRate = static_cast<int>( tempRate );
if( m_font )

View File

@@ -282,16 +282,14 @@ static const int onethirdoctavecenterfr[] = {20, 25, 31, 40, 50, 63, 80, 100, 12
returns power on success, else -1 */
float signalpower(float *timesignal, int num_values)
{
float power=0;
unsigned int i;
if ( num_values<=0 )
return -1;
if( timesignal==NULL )
return -1;
for ( i=0; i<num_values; i++ )
float power=0;
for ( int i=0; i<num_values; i++ )
{
power+=timesignal[i]*timesignal[i];
}