23 |
|
|
24 |
#include <getopt.h> |
#include <getopt.h> |
25 |
#include <signal.h> |
#include <signal.h> |
26 |
|
#include <sys/stat.h> |
27 |
|
|
28 |
#if defined(WIN32) |
#if defined(WIN32) |
29 |
// require at least Windows 2000 for the GlobalMemoryStatusEx() call |
// require at least Windows 2000 for the GlobalMemoryStatusEx() call |
30 |
|
#if _WIN32_WINNT < 0x0500 |
31 |
|
#ifdef _WIN32_WINNT |
32 |
|
#undef _WIN32_WINNT |
33 |
|
#endif |
34 |
#define _WIN32_WINNT 0x0500 |
#define _WIN32_WINNT 0x0500 |
35 |
#endif |
#endif |
36 |
|
#endif |
37 |
|
|
38 |
#include "Sampler.h" |
#include "Sampler.h" |
39 |
#include "common/global_private.h" |
#include "common/global_private.h" |
41 |
#include "plugins/InstrumentEditorFactory.h" |
#include "plugins/InstrumentEditorFactory.h" |
42 |
#include "drivers/midi/MidiInputDeviceFactory.h" |
#include "drivers/midi/MidiInputDeviceFactory.h" |
43 |
#include "drivers/audio/AudioOutputDeviceFactory.h" |
#include "drivers/audio/AudioOutputDeviceFactory.h" |
44 |
|
#include "effects/EffectFactory.h" |
45 |
#include "engines/gig/Profiler.h" |
#include "engines/gig/Profiler.h" |
46 |
#include "network/lscpserver.h" |
#include "network/lscpserver.h" |
47 |
#include "common/stacktrace.h" |
#include "common/stacktrace.h" |
121 |
dmsg(1,("Copyright (C) 2005-2009 Christian Schoenebeck\n")); |
dmsg(1,("Copyright (C) 2005-2009 Christian Schoenebeck\n")); |
122 |
|
|
123 |
#if defined(WIN32) |
#if defined(WIN32) |
124 |
|
#if 0 |
125 |
// some WIN32 memory info code which tries to determine the maximum lockable amount of memory (for debug purposes) |
// some WIN32 memory info code which tries to determine the maximum lockable amount of memory (for debug purposes) |
126 |
SYSTEM_INFO siSysInfo; |
SYSTEM_INFO siSysInfo; |
127 |
long physical_memory; |
long physical_memory; |
128 |
GetSystemInfo(&siSysInfo); |
GetSystemInfo(&siSysInfo); |
129 |
dmsg(1,("page size=%d\n", siSysInfo.dwPageSize)); |
dmsg(2,("page size=%d\n", siSysInfo.dwPageSize)); |
130 |
|
|
131 |
MEMORYSTATUSEX statex; |
MEMORYSTATUSEX statex; |
132 |
statex.dwLength = sizeof (statex); |
statex.dwLength = sizeof (statex); |
133 |
GlobalMemoryStatusEx (&statex); |
GlobalMemoryStatusEx (&statex); |
134 |
dmsg(1, ("There are %*I64d total Kbytes of physical memory.\n", |
dmsg(2, ("There are %*I64d total Kbytes of physical memory.\n", |
135 |
8, statex.ullTotalPhys)); |
8, statex.ullTotalPhys)); |
136 |
dmsg(1, ("There are %*I64d free Kbytes of physical memory.\n", |
dmsg(2, ("There are %*I64d free Kbytes of physical memory.\n", |
137 |
8, statex.ullAvailPhys)); |
8, statex.ullAvailPhys)); |
138 |
physical_memory = statex.ullTotalPhys; |
physical_memory = statex.ullTotalPhys; |
139 |
|
|
166 |
if(RequestedMinimumWorkingSetSize < DefaultMinimumWorkingSetSize) break; |
if(RequestedMinimumWorkingSetSize < DefaultMinimumWorkingSetSize) break; |
167 |
} |
} |
168 |
|
|
169 |
dmsg(1,("AFTER GetProcessWorkingSetSize: res = %d MinimumWorkingSetSize=%d, MaximumWorkingSetSize=%d\n", res,MinimumWorkingSetSize, MaximumWorkingSetSize)); |
dmsg(2,("AFTER GetProcessWorkingSetSize: res = %d MinimumWorkingSetSize=%d, MaximumWorkingSetSize=%d\n", res,MinimumWorkingSetSize, MaximumWorkingSetSize)); |
170 |
|
#endif |
171 |
#endif // WIN32 |
#endif // WIN32 |
172 |
|
|
173 |
if (tune) { |
if (tune) { |
189 |
dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str())); |
dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str())); |
190 |
dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str())); |
dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str())); |
191 |
dmsg(1,("Registered instrument editors: %s\n", InstrumentEditorFactory::AvailableEditorsAsString().c_str())); |
dmsg(1,("Registered instrument editors: %s\n", InstrumentEditorFactory::AvailableEditorsAsString().c_str())); |
192 |
|
dmsg(1,("Registered internal effect systems: %s\n", EffectFactory::AvailableEffectSystemsAsString().c_str())); |
193 |
|
dmsg(1,("Registered internal effects: %d\n", EffectFactory::AvailableEffectsCount())); |
194 |
|
|
195 |
// start LSCP network server |
// start LSCP network server |
196 |
struct in_addr addr; |
struct in_addr addr; |
348 |
break; |
break; |
349 |
case 2: // --profile |
case 2: // --profile |
350 |
profile = true; |
profile = true; |
351 |
|
//FIXME: profiling code is currently broken! |
352 |
|
std::cerr << "Option '--profile' is currently not supported, since the profiling code is currently broken!" << std::endl; |
353 |
|
exit(EXIT_FAILURE); |
354 |
break; |
break; |
355 |
case 3: // --no-tune |
case 3: // --no-tune |
356 |
tune = false; |
tune = false; |