/[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 411 by schoenebeck, Sat Feb 26 02:01:14 2005 UTC revision 420 by schoenebeck, Thu Mar 3 03:25:17 2005 UTC
# Line 25  Line 25 
25  #include <signal.h>  #include <signal.h>
26    
27  #include "Sampler.h"  #include "Sampler.h"
28    #include "engines/EngineFactory.h"
29  #include "drivers/midi/MidiInputDeviceFactory.h"  #include "drivers/midi/MidiInputDeviceFactory.h"
30  #include "drivers/audio/AudioOutputDeviceFactory.h"  #include "drivers/audio/AudioOutputDeviceFactory.h"
31  #include "engines/gig/Profiler.h"  #include "engines/gig/Profiler.h"
# Line 37  using namespace LinuxSampler; Line 38  using namespace LinuxSampler;
38  Sampler*    pSampler    = NULL;  Sampler*    pSampler    = NULL;
39  LSCPServer* pLSCPServer = NULL;  LSCPServer* pLSCPServer = NULL;
40  pthread_t   main_thread;  pthread_t   main_thread;
41    bool bPrintStatistics = false;
42  bool profile = false;  bool profile = false;
43  bool tune = true;  bool tune = true;
44    
# Line 117  int main(int argc, char **argv) { Line 119  int main(int argc, char **argv) {
119      rtEvents.push_back(LSCPEvent::event_stream_count);      rtEvents.push_back(LSCPEvent::event_stream_count);
120      rtEvents.push_back(LSCPEvent::event_buffer_fill);      rtEvents.push_back(LSCPEvent::event_buffer_fill);
121    
122      while(true)      while (true) {
123      {          if (bPrintStatistics) {
124        /*printf("Voices: %3.3d (Max: %3.3d) Streams: %3.3d (Max: %3.3d, Unused: %3.3d)\r",              std::set<Engine*> engines = EngineFactory::EngineInstances();
125              pEngine->ActiveVoiceCount, pEngine->ActiveVoiceCountMax,              std::set<Engine*>::iterator itEngine = engines.begin();
126              pEngine->pDiskThread->ActiveStreamCount, pEngine->pDiskThread->ActiveStreamCountMax, Stream::GetUnusedStreams());              for (int i = 0; itEngine != engines.end(); itEngine++, i++) {
127        fflush(stdout);*/                  Engine* pEngine = *itEngine;
128                    printf("Engine %d) Voices: %3.3d (Max: %3.3d) Streams: %3.3d (Max: %3.3d)\n", i,
129                        pEngine->VoiceCount(), pEngine->VoiceCountMax(),
130                        pEngine->DiskStreamCount(), pEngine->DiskStreamCountMax()
131                    );
132                    fflush(stdout);
133                }
134            }
135            
136        sleep(1);        sleep(1);
137        if (profile)        if (profile)
138        {        {
# Line 216  void parse_options(int argc, char **argv Line 226  void parse_options(int argc, char **argv
226              {"version",0,0,0},              {"version",0,0,0},
227              {"profile",0,0,0},              {"profile",0,0,0},
228              {"no-tune",0,0,0},              {"no-tune",0,0,0},
229                {"statistics",0,0,0},
230              {0,0,0,0}              {0,0,0,0}
231          };          };
232    
# Line 234  void parse_options(int argc, char **argv Line 245  void parse_options(int argc, char **argv
245                      printf("--version          prints version information\n");                      printf("--version          prints version information\n");
246                      printf("--profile          profile synthesis algorithms\n");                      printf("--profile          profile synthesis algorithms\n");
247                      printf("--no-tune          disable assembly optimization\n");                      printf("--no-tune          disable assembly optimization\n");
248                        printf("--statistics       prints periodically statistics\n");
249                      exit(EXIT_SUCCESS);                      exit(EXIT_SUCCESS);
250                      break;                      break;
251                  case 1: // --version                  case 1: // --version
# Line 246  void parse_options(int argc, char **argv Line 258  void parse_options(int argc, char **argv
258                  case 3: // --no-tune                  case 3: // --no-tune
259                      tune = false;                      tune = false;
260                      break;                      break;
261                    case 4: // --statistics
262                        bPrintStatistics = true;
263                        break;
264              }              }
265          }          }
266      }      }

Legend:
Removed from v.411  
changed lines
  Added in v.420

  ViewVC Help
Powered by ViewVC