bugfix: length of excitation

pull/1/head
Sebastian Held 2010-03-30 13:10:42 +02:00 committed by Thorsten Liebig
parent b1cb1e30e3
commit 2d325d316d
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ bool Engine::IterateTS(unsigned int iterTS)
for (unsigned int n=0;n<Op->E_Exc_Count;++n) for (unsigned int n=0;n<Op->E_Exc_Count;++n)
{ {
exc_pos = (int)numTS - (int)Op->E_Exc_delay[n]; exc_pos = (int)numTS - (int)Op->E_Exc_delay[n];
exc_pos*= (exc_pos>0 && exc_pos<(int)Op->ExciteLength); exc_pos *= (exc_pos>0 && exc_pos<=(int)Op->ExciteLength);
// if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl; // if (n==0) cerr << numTS << " => " << Op->ExciteSignal[exc_pos] << endl;
volt[Op->E_Exc_dir[n]][Op->E_Exc_index[0][n]][Op->E_Exc_index[1][n]][Op->E_Exc_index[2][n]] += Op->E_Exc_amp[n]*Op->ExciteSignal[exc_pos]; volt[Op->E_Exc_dir[n]][Op->E_Exc_index[0][n]][Op->E_Exc_index[1][n]][Op->E_Exc_index[2][n]] += Op->E_Exc_amp[n]*Op->ExciteSignal[exc_pos];
} }