165 |
if (!pEngineChannel) continue; |
if (!pEngineChannel) continue; |
166 |
Engine* pEngine = pEngineChannel->GetEngine(); |
Engine* pEngine = pEngineChannel->GetEngine(); |
167 |
if (!pEngine) continue; |
if (!pEngine) continue; |
168 |
pSampler->fireVoiceCountChanged(iter->first, pEngine->VoiceCount()); |
pSampler->fireVoiceCountChanged(iter->first, pEngineChannel->GetVoiceCount()); |
169 |
pSampler->fireStreamCountChanged(iter->first, pEngine->DiskStreamCount()); |
pSampler->fireStreamCountChanged(iter->first, pEngineChannel->GetDiskStreamCount()); |
170 |
pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); |
pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); |
171 |
pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); |
pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); |
172 |
} |
} |
182 |
switch (iSignal) { |
switch (iSignal) { |
183 |
case SIGINT: { |
case SIGINT: { |
184 |
if (pthread_equal(pthread_self(), main_thread)) { |
if (pthread_equal(pthread_self(), main_thread)) { |
185 |
if (pLSCPServer) { |
if (pLSCPServer) pLSCPServer->StopThread(); |
186 |
pLSCPServer->StopThread(); |
// the delete order here is important: the Sampler |
187 |
delete pLSCPServer; |
// destructor sends notifications to the lscpserver |
|
} |
|
188 |
if (pSampler) delete pSampler; |
if (pSampler) delete pSampler; |
189 |
|
if (pLSCPServer) delete pLSCPServer; |
190 |
#if HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
191 |
InstrumentsDb::Destroy(); |
InstrumentsDb::Destroy(); |
192 |
#endif |
#endif |