--- linuxsampler/trunk/src/linuxsampler.cpp 2008/01/19 16:55:03 1644 +++ linuxsampler/trunk/src/linuxsampler.cpp 2008/09/06 16:44:42 1765 @@ -156,7 +156,7 @@ dmsg(1,("LinuxSampler %s\n", VERSION)); dmsg(1,("Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck\n")); - dmsg(1,("Copyright (C) 2005-2007 Christian Schoenebeck\n")); + dmsg(1,("Copyright (C) 2005-2008 Christian Schoenebeck\n")); if (tune) { // detect and print system / CPU specific features @@ -196,12 +196,6 @@ printf("LinuxSampler initialization completed. :-)\n\n"); - std::list rtEvents; - rtEvents.push_back(LSCPEvent::event_voice_count); - rtEvents.push_back(LSCPEvent::event_stream_count); - rtEvents.push_back(LSCPEvent::event_buffer_fill); - rtEvents.push_back(LSCPEvent::event_total_voice_count); - while (atomic_read(&running)) { if (bPrintStatistics) { const std::set& engines = EngineFactory::EngineInstances(); @@ -228,25 +222,7 @@ } } - if (LSCPServer::EventSubscribers(rtEvents)) - { - LSCPServer::LockRTNotify(); - std::map channels = pSampler->GetSamplerChannels(); - std::map::iterator iter = channels.begin(); - for (; iter != channels.end(); iter++) { - SamplerChannel* pSamplerChannel = iter->second; - EngineChannel* pEngineChannel = pSamplerChannel->GetEngineChannel(); - if (!pEngineChannel) continue; - Engine* pEngine = pEngineChannel->GetEngine(); - if (!pEngine) continue; - pSampler->fireVoiceCountChanged(iter->first, pEngineChannel->GetVoiceCount()); - pSampler->fireStreamCountChanged(iter->first, pEngineChannel->GetDiskStreamCount()); - pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); - pSampler->fireTotalStreamCountChanged(pSampler->GetDiskStreamCount()); - pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); - } - LSCPServer::UnlockRTNotify(); - } + pSampler->fireStatistics(); } if (pLSCPServer) pLSCPServer->StopThread(); // the delete order here is important: the Sampler