112 |
if (profile) |
if (profile) |
113 |
{ |
{ |
114 |
dmsg(1,("Calibrating profiler...")); |
dmsg(1,("Calibrating profiler...")); |
115 |
gig::Profiler::Calibrate(); |
LinuxSampler::gig::Profiler::Calibrate(); |
116 |
gig::Profiler::Reset(); |
LinuxSampler::gig::Profiler::Reset(); |
117 |
gig::Profiler::enable(); |
LinuxSampler::gig::Profiler::enable(); |
118 |
dmsg(1,("OK\n")); |
dmsg(1,("OK\n")); |
119 |
} |
} |
120 |
|
|
144 |
if (profile) |
if (profile) |
145 |
{ |
{ |
146 |
unsigned int samplingFreq = 48000; //FIXME: hardcoded for now |
unsigned int samplingFreq = 48000; //FIXME: hardcoded for now |
147 |
unsigned int bv = gig::Profiler::GetBogoVoices(samplingFreq); |
unsigned int bv = LinuxSampler::gig::Profiler::GetBogoVoices(samplingFreq); |
148 |
if (bv != 0) |
if (bv != 0) |
149 |
{ |
{ |
150 |
printf(" BogoVoices: %i \r", bv); |
printf(" BogoVoices: %i \r", bv); |
163 |
if (!pEngineChannel) continue; |
if (!pEngineChannel) continue; |
164 |
Engine* pEngine = pEngineChannel->GetEngine(); |
Engine* pEngine = pEngineChannel->GetEngine(); |
165 |
if (!pEngine) continue; |
if (!pEngine) continue; |
166 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_voice_count, iter->first, pEngine->VoiceCount())); |
pSampler->fireVoiceCountChanged(iter->first, pEngine->VoiceCount()); |
167 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_stream_count, iter->first, pEngine->DiskStreamCount())); |
pSampler->fireStreamCountChanged(iter->first, pEngine->DiskStreamCount()); |
168 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_buffer_fill, iter->first, pEngine->DiskStreamBufferFillPercentage())); |
pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); |
169 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, pSampler->GetVoiceCount())); |
pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); |
170 |
} |
} |
171 |
LSCPServer::UnlockRTNotify(); |
LSCPServer::UnlockRTNotify(); |
172 |
} |
} |
185 |
delete pLSCPServer; |
delete pLSCPServer; |
186 |
} |
} |
187 |
if (pSampler) delete pSampler; |
if (pSampler) delete pSampler; |
188 |
|
#if HAVE_SQLITE3 |
189 |
|
InstrumentsDb::Destroy(); |
190 |
|
#endif |
191 |
printf("LinuxSampler stopped due to SIGINT.\n"); |
printf("LinuxSampler stopped due to SIGINT.\n"); |
192 |
exit(EXIT_SUCCESS); |
exit(EXIT_SUCCESS); |
193 |
} |
} |