/[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 328 by schoenebeck, Sat Dec 25 21:58:58 2004 UTC revision 360 by senkov, Mon Feb 7 00:19:30 2005 UTC
# Line 110  int main(int argc, char **argv) { Line 110  int main(int argc, char **argv) {
110    
111      printf("LinuxSampler initialization completed.\n");      printf("LinuxSampler initialization completed.\n");
112    
113      while(true)  {      std::list<LSCPEvent::event_t> rtEvents;
114        rtEvents.push_back(LSCPEvent::event_voice_count);
115        rtEvents.push_back(LSCPEvent::event_stream_count);
116        rtEvents.push_back(LSCPEvent::event_buffer_fill);
117    
118        while(true)
119        {
120        /*printf("Voices: %3.3d (Max: %3.3d) Streams: %3.3d (Max: %3.3d, Unused: %3.3d)\r",        /*printf("Voices: %3.3d (Max: %3.3d) Streams: %3.3d (Max: %3.3d, Unused: %3.3d)\r",
121              pEngine->ActiveVoiceCount, pEngine->ActiveVoiceCountMax,              pEngine->ActiveVoiceCount, pEngine->ActiveVoiceCountMax,
122              pEngine->pDiskThread->ActiveStreamCount, pEngine->pDiskThread->ActiveStreamCountMax, Stream::GetUnusedStreams());              pEngine->pDiskThread->ActiveStreamCount, pEngine->pDiskThread->ActiveStreamCountMax, Stream::GetUnusedStreams());
# Line 126  int main(int argc, char **argv) { Line 132  int main(int argc, char **argv) {
132                        fflush(stdout);                        fflush(stdout);
133                }                }
134        }        }
135          
136          if (LSCPServer::EventSubscribers(rtEvents))
137          {
138                  LSCPServer::LockRTNotify();
139                  std::map<uint,SamplerChannel*> channels = pSampler->GetSamplerChannels();
140                  std::map<uint,SamplerChannel*>::iterator iter = channels.begin();
141                  for (; iter != channels.end(); iter++) {
142                          SamplerChannel* pSamplerChannel = iter->second;
143                          Engine* pEngine = pSamplerChannel->GetEngine();
144                          if (!pEngine) continue;
145                          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_voice_count, iter->first, pEngine->VoiceCount()));
146                          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_stream_count, iter->first, pEngine->DiskStreamCount()));
147                          LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_buffer_fill, iter->first, pEngine->DiskStreamBufferFillPercentage()));
148                  }
149                  LSCPServer::UnlockRTNotify();
150          }
151    
152      }      }
153    
154      return EXIT_SUCCESS;      return EXIT_SUCCESS;

Legend:
Removed from v.328  
changed lines
  Added in v.360

  ViewVC Help
Powered by ViewVC