/[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 2473 by schoenebeck, Sun Sep 15 17:55:56 2013 UTC
# 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

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

  ViewVC Help
Powered by ViewVC