/[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 2162 by persson, Tue Feb 8 18:22:50 2011 UTC revision 2306 by iliev, Tue Jan 24 13:00:40 2012 UTC
# Line 73  bool tune = true; Line 73  bool tune = true;
73  static bool bShowStackTrace = false;  static bool bShowStackTrace = false;
74  unsigned long int lscp_addr;  unsigned long int lscp_addr;
75  unsigned short int lscp_port;  unsigned short int lscp_port;
76    String ExecAfterInit;
77    
78  void parse_options(int argc, char **argv);  void parse_options(int argc, char **argv);
79  void signal_handler(int signal);  void signal_handler(int signal);
# Line 211  int main(int argc, char **argv) { Line 212  int main(int argc, char **argv) {
212      }      }
213    
214      printf("LinuxSampler initialization completed. :-)\n\n");      printf("LinuxSampler initialization completed. :-)\n\n");
215        
216        if (ExecAfterInit != "") {
217            printf("Executing command: %s\n\n", ExecAfterInit.c_str());
218            if (system(ExecAfterInit.c_str()) == -1) {
219                std::cerr << "Failed to execute the command" << std::endl;
220            }
221        }
222    
223      while (atomic_read(&running)) {      while (atomic_read(&running)) {
224          if (bPrintStatistics) {          if (bPrintStatistics) {
# Line 315  void parse_options(int argc, char **argv Line 323  void parse_options(int argc, char **argv
323              {"lscp-addr",1,0,0},              {"lscp-addr",1,0,0},
324              {"lscp-port",1,0,0},              {"lscp-port",1,0,0},
325              {"stacktrace",0,0,0},              {"stacktrace",0,0,0},
326                {"exec-after-init",1,0,0},
327              {0,0,0,0}              {0,0,0,0}
328          };          };
329    
# Line 340  void parse_options(int argc, char **argv Line 349  void parse_options(int argc, char **argv
349                      printf("--instruments-db-location   specifies the instruments DB file\n");                      printf("--instruments-db-location   specifies the instruments DB file\n");
350                      printf("--stacktrace                automatically shows stacktrace if crashes\n");                      printf("--stacktrace                automatically shows stacktrace if crashes\n");
351                      printf("                            (broken on most systems at the moment)\n");                      printf("                            (broken on most systems at the moment)\n");
352                        printf("--exec-after-init           executes a command after initialization\n");
353                      exit(EXIT_SUCCESS);                      exit(EXIT_SUCCESS);
354                      break;                      break;
355                  case 1: // --version                  case 1: // --version
# Line 432  void parse_options(int argc, char **argv Line 442  void parse_options(int argc, char **argv
442                  case 9: // --stacktrace                  case 9: // --stacktrace
443                      bShowStackTrace = true;                      bShowStackTrace = true;
444                      break;                      break;
445                    case 10: // --exec-after-init
446                        ExecAfterInit = optarg;
447                        break;
448              }              }
449          }          }
450      }      }

Legend:
Removed from v.2162  
changed lines
  Added in v.2306

  ViewVC Help
Powered by ViewVC