2 |
* * |
* * |
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, 2006 Christian Schoenebeck * |
* Copyright (C) 2005-2007 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 * |
57 |
main_pid = getpid(); |
main_pid = getpid(); |
58 |
main_thread = pthread_self(); |
main_thread = pthread_self(); |
59 |
|
|
|
|
|
|
|
|
60 |
// setting signal handler for catching SIGINT (thus e.g. <CTRL><C>) |
// setting signal handler for catching SIGINT (thus e.g. <CTRL><C>) |
61 |
signal(SIGINT, signal_handler); |
signal(SIGINT, signal_handler); |
62 |
|
|
80 |
parse_options(argc, argv); |
parse_options(argc, argv); |
81 |
|
|
82 |
dmsg(1,("LinuxSampler %s\n", VERSION)); |
dmsg(1,("LinuxSampler %s\n", VERSION)); |
83 |
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")); |
84 |
dmsg(1,("Copyright (C) 2005, 2006 Christian Schoenebeck\n")); |
dmsg(1,("Copyright (C) 2005-2007 Christian Schoenebeck\n")); |
85 |
|
|
86 |
if (tune) { |
if (tune) { |
87 |
// detect and print system / CPU specific features |
// detect and print system / CPU specific features |
96 |
pSampler = new Sampler; |
pSampler = new Sampler; |
97 |
dmsg(1,("OK\n")); |
dmsg(1,("OK\n")); |
98 |
|
|
99 |
|
dmsg(1,("Registered sampler engines: %s\n", EngineFactory::AvailableEngineTypesAsString().c_str())); |
100 |
dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str())); |
dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str())); |
101 |
dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str())); |
dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str())); |
102 |
|
|
163 |
if (!pEngineChannel) continue; |
if (!pEngineChannel) continue; |
164 |
Engine* pEngine = pEngineChannel->GetEngine(); |
Engine* pEngine = pEngineChannel->GetEngine(); |
165 |
if (!pEngine) continue; |
if (!pEngine) continue; |
166 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_voice_count, iter->first, pEngine->VoiceCount())); |
pSampler->fireVoiceCountChanged(iter->first, pEngine->VoiceCount()); |
167 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_stream_count, iter->first, pEngine->DiskStreamCount())); |
pSampler->fireStreamCountChanged(iter->first, pEngine->DiskStreamCount()); |
168 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_buffer_fill, iter->first, pEngine->DiskStreamBufferFillPercentage())); |
pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage()); |
169 |
LSCPServer::SendLSCPNotify(LSCPEvent(LSCPEvent::event_total_voice_count, pSampler->GetVoiceCount())); |
pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount()); |
170 |
} |
} |
171 |
LSCPServer::UnlockRTNotify(); |
LSCPServer::UnlockRTNotify(); |
172 |
} |
} |