/[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 1208 by iliev, Sat May 26 22:20:46 2007 UTC revision 1297 by iliev, Thu Aug 16 15:55:21 2007 UTC
# Line 26  Line 26 
26    
27  #include "Sampler.h"  #include "Sampler.h"
28  #include "engines/EngineFactory.h"  #include "engines/EngineFactory.h"
29    #include "engines/InstrumentEditorFactory.h"
30  #include "drivers/midi/MidiInputDeviceFactory.h"  #include "drivers/midi/MidiInputDeviceFactory.h"
31  #include "drivers/audio/AudioOutputDeviceFactory.h"  #include "drivers/audio/AudioOutputDeviceFactory.h"
32  #include "engines/gig/Profiler.h"  #include "engines/gig/Profiler.h"
# Line 99  int main(int argc, char **argv) { Line 100  int main(int argc, char **argv) {
100      dmsg(1,("Registered sampler engines: %s\n", EngineFactory::AvailableEngineTypesAsString().c_str()));      dmsg(1,("Registered sampler engines: %s\n", EngineFactory::AvailableEngineTypesAsString().c_str()));
101      dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str()));      dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str()));
102      dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str()));      dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str()));
103        dmsg(1,("Registered instrument editors: %s\n", InstrumentEditorFactory::AvailableEditorsAsString().c_str()));
104    
105      // start LSCP network server      // start LSCP network server
106      struct in_addr addr;      struct in_addr addr;
# Line 163  int main(int argc, char **argv) { Line 165  int main(int argc, char **argv) {
165                if (!pEngineChannel) continue;                if (!pEngineChannel) continue;
166                Engine* pEngine = pEngineChannel->GetEngine();                Engine* pEngine = pEngineChannel->GetEngine();
167                if (!pEngine) continue;                if (!pEngine) continue;
168                pSampler->fireVoiceCountChanged(iter->first, pEngine->VoiceCount());                pSampler->fireVoiceCountChanged(iter->first, pEngineChannel->GetVoiceCount());
169                pSampler->fireStreamCountChanged(iter->first, pEngine->DiskStreamCount());                pSampler->fireStreamCountChanged(iter->first, pEngineChannel->GetDiskStreamCount());
170                pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage());                pSampler->fireBufferFillChanged(iter->first, pEngine->DiskStreamBufferFillPercentage());
171                pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount());                pSampler->fireTotalVoiceCountChanged(pSampler->GetVoiceCount());
172            }            }
# Line 180  void signal_handler(int iSignal) { Line 182  void signal_handler(int iSignal) {
182      switch (iSignal) {      switch (iSignal) {
183          case SIGINT: {          case SIGINT: {
184              if (pthread_equal(pthread_self(), main_thread)) {              if (pthread_equal(pthread_self(), main_thread)) {
185                  if (pLSCPServer) {                  if (pLSCPServer) pLSCPServer->StopThread();
186                      pLSCPServer->StopThread();                  // the delete order here is important: the Sampler
187                      delete pLSCPServer;                  // destructor sends notifications to the lscpserver
                 }  
188                  if (pSampler) delete pSampler;                  if (pSampler) delete pSampler;
189                    if (pLSCPServer) delete pLSCPServer;
190  #if HAVE_SQLITE3  #if HAVE_SQLITE3
191                  InstrumentsDb::Destroy();                  InstrumentsDb::Destroy();
192  #endif  #endif

Legend:
Removed from v.1208  
changed lines
  Added in v.1297

  ViewVC Help
Powered by ViewVC