/[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 2390 by persson, Sat Jan 5 12:31:05 2013 UTC revision 2837 by persson, Sun Aug 23 06:14:00 2015 UTC
# Line 3  Line 3 
3   *   LinuxSampler - modular, streaming capable sampler                     *   *   LinuxSampler - modular, streaming capable sampler                     *
4   *                                                                         *   *                                                                         *
5   *   Copyright (C) 2003-2004 by Benno Senoner and Christian Schoenebeck    *   *   Copyright (C) 2003-2004 by Benno Senoner and Christian Schoenebeck    *
6   *   Copyright (C) 2005-2013 Christian Schoenebeck                         *   *   Copyright (C) 2005-2015 Christian Schoenebeck                         *
7   *                                                                         *   *                                                                         *
8   *   This program is free software; you can redistribute it and/or modify  *   *   This program is free software; you can redistribute it and/or modify  *
9   *   it under the terms of the GNU General Public License as published by  *   *   it under the terms of the GNU General Public License as published by  *
# Line 119  int main(int argc, char **argv) { Line 119  int main(int argc, char **argv) {
119    
120      dmsg(1,("LinuxSampler %s\n", VERSION));      dmsg(1,("LinuxSampler %s\n", VERSION));
121      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"));
122      dmsg(1,("Copyright (C) 2005-2013 Christian Schoenebeck\n"));      dmsg(1,("Copyright (C) 2005-2015 Christian Schoenebeck\n"));
123    
124      #if defined(WIN32)      #if defined(WIN32)
125      #if 0      #if 0
# Line 220  int main(int argc, char **argv) { Line 220  int main(int argc, char **argv) {
220          }          }
221      }      }
222    
223    //TODO: (hopefully) just a temporary nasty hack for launching gigedit on the main thread on Mac (see comments in gigedit.cpp for details)
224    #if defined(__APPLE__)
225        g_mainThreadCallbackSupported = true;
226    #endif
227    
228      while (atomic_read(&running)) {      while (atomic_read(&running)) {
229          if (bPrintStatistics) {          if (bPrintStatistics) {
230              const std::set<Engine*>& engines = EngineFactory::EngineInstances();              const std::set<Engine*>& engines = EngineFactory::EngineInstances();
# Line 247  int main(int argc, char **argv) { Line 252  int main(int argc, char **argv) {
252          }          }
253    
254          pSampler->fireStatistics();          pSampler->fireStatistics();
255            
256            //TODO: (hopefully) just a temporary nasty hack for launching gigedit on the main thread on Mac (see comments in gigedit.cpp for details)
257            #if defined(__APPLE__)
258            if (g_fireMainThreadCallback && g_mainThreadCallback) {
259                void (*fn)(void* info) = g_mainThreadCallback;
260                void* info = g_mainThreadCallbackInfo;
261                g_mainThreadCallbackInfo = NULL;
262                g_mainThreadCallback     = NULL;
263                g_fireMainThreadCallback = false;
264                printf("Received main thread callback, calling now ...\n"); fflush(stdout);
265                (*fn)(info);
266                printf("Main thread callback executed.\n"); fflush(stdout);
267            }
268            #endif
269      }      }
270    //#endif
271      if (pLSCPServer) pLSCPServer->StopThread();      if (pLSCPServer) pLSCPServer->StopThread();
272      // the delete order here is important: the Sampler      // the delete order here is important: the Sampler
273      // destructor sends notifications to the lscpserver      // destructor sends notifications to the lscpserver
# Line 433  void parse_options(int argc, char **argv Line 453  void parse_options(int argc, char **argv
453                  }                  }
454                  case 8: {// --lscp-port                  case 8: {// --lscp-port
455                      long unsigned int port = 0;                      long unsigned int port = 0;
456                      if ((sscanf(optarg, "%u", &port) != 1) || (port == 0) || (port > 65535))                      if ((sscanf(optarg, "%lu", &port) != 1) || (port == 0) || (port > 65535))
457                          printf("WARNING: Failed to parse lscp-port argument, ignoring!\n");                          printf("WARNING: Failed to parse lscp-port argument, ignoring!\n");
458                      else                      else
459                          lscp_port = htons(port);                          lscp_port = htons(port);

Legend:
Removed from v.2390  
changed lines
  Added in v.2837

  ViewVC Help
Powered by ViewVC