/[svn]/linuxsampler/trunk/src/linuxsampler.cpp
ViewVC logotype

Diff of /linuxsampler/trunk/src/linuxsampler.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1644 by persson, Sat Jan 19 16:55:03 2008 UTC revision 1765 by persson, Sat Sep 6 16:44:42 2008 UTC
# Line 156  int main(int argc, char **argv) { Line 156  int main(int argc, char **argv) {
156    
157      dmsg(1,("LinuxSampler %s\n", VERSION));      dmsg(1,("LinuxSampler %s\n", VERSION));
158      dmsg(1,("Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck\n"));      dmsg(1,("Copyright (C) 2003,2004 by Benno Senoner and Christian Schoenebeck\n"));
159      dmsg(1,("Copyright (C) 2005-2007 Christian Schoenebeck\n"));      dmsg(1,("Copyright (C) 2005-2008 Christian Schoenebeck\n"));
160    
161      if (tune) {      if (tune) {
162          // detect and print system / CPU specific features          // detect and print system / CPU specific features
# Line 196  int main(int argc, char **argv) { Line 196  int main(int argc, char **argv) {
196    
197      printf("LinuxSampler initialization completed. :-)\n\n");      printf("LinuxSampler initialization completed. :-)\n\n");
198    
     std::list<LSCPEvent::event_t> 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);  
   
199      while (atomic_read(&running)) {      while (atomic_read(&running)) {
200          if (bPrintStatistics) {          if (bPrintStatistics) {
201              const std::set<Engine*>& engines = EngineFactory::EngineInstances();              const std::set<Engine*>& engines = EngineFactory::EngineInstances();
# Line 228  int main(int argc, char **argv) { Line 222  int main(int argc, char **argv) {
222              }              }
223          }          }
224    
225          if (LSCPServer::EventSubscribers(rtEvents))          pSampler->fireStatistics();
         {  
             LSCPServer::LockRTNotify();  
             std::map<uint,SamplerChannel*> channels = pSampler->GetSamplerChannels();  
             std::map<uint,SamplerChannel*>::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();  
         }  
226      }      }
227      if (pLSCPServer) pLSCPServer->StopThread();      if (pLSCPServer) pLSCPServer->StopThread();
228      // the delete order here is important: the Sampler      // the delete order here is important: the Sampler

Legend:
Removed from v.1644  
changed lines
  Added in v.1765

  ViewVC Help
Powered by ViewVC