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-2014 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 * |
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-2014 Christian Schoenebeck\n")); |
123 |
|
|
124 |
#if defined(WIN32) |
#if defined(WIN32) |
125 |
#if 0 |
#if 0 |
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(); |
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 |