Commit 3342241b authored by Dipl.-Ing. Jonas Stienen's avatar Dipl.-Ing. Jonas Stienen
Browse files

Adding processing time observer for jet engine, real-time ratio about 23

parent 8009c847
......@@ -18,6 +18,7 @@ int iTotalSamples = 0;
int main( int, char** )
{
ITAStopWatch sw;
ITASampleBuffer oOutputBuffer( g_iOutputLengthSamples );
vector<float > vfRPMs = { 1000.f, 4000.0f, 2000.0f };
......@@ -31,7 +32,9 @@ int main( int, char** )
oPatch.SetRPM( vfRPMs[ m ] );
int iProcessSamples = std::min( iTimeSeriesLeg, g_iOutputLengthSamples - m * iTimeSeriesLeg );
sw.start();
oPatch.Process( oOutputBuffer.GetData() + iTotalSamples, iProcessSamples );
sw.stop();
iTotalSamples += iProcessSamples;
}
assert( iTotalSamples == oOutputBuffer.GetLength() );
......@@ -40,5 +43,7 @@ int main( int, char** )
writeAudiofile( sFilePath, &oOutputBuffer, g_dSampleRate, ITAQuantization::ITA_FLOAT );
cout << "Exported result to " << sFilePath << endl;
cout << "Real-time ratio: " << iTimeSeriesLeg / g_dSampleRate / sw.mean() << endl;
return 255;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment