--- linuxsampler/trunk/src/linuxsampler.cpp 2005/09/23 06:58:26 778 +++ linuxsampler/trunk/src/linuxsampler.cpp 2006/07/05 17:53:22 900 @@ -3,7 +3,7 @@ * LinuxSampler - modular, streaming capable sampler * * * * Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * - * Copyright (C) 2005 Christian Schoenebeck * + * Copyright (C) 2005, 2006 Christian Schoenebeck * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * @@ -38,6 +38,7 @@ Sampler* pSampler = NULL; LSCPServer* pLSCPServer = NULL; pthread_t main_thread; +pid_t main_pid; bool bPrintStatistics = false; bool profile = false; bool tune = true; @@ -53,6 +54,7 @@ // initialize the stack trace mechanism with our binary file StackTraceInit(argv[0], -1); + main_pid = getpid(); main_thread = pthread_self(); // setting signal handler for catching SIGINT (thus e.g. ) @@ -79,7 +81,7 @@ dmsg(1,("LinuxSampler %s\n", VERSION)); dmsg(1,("Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck\n")); - dmsg(1,("Copyright (C) 2005 Christian Schoenebeck\n")); + dmsg(1,("Copyright (C) 2005, 2006 Christian Schoenebeck\n")); if (tune) { // detect and print system / CPU specific features @@ -94,6 +96,7 @@ pSampler = new Sampler; dmsg(1,("OK\n")); + dmsg(1,("Registered sampler engines: %s\n", EngineFactory::AvailableEngineTypesAsString().c_str())); dmsg(1,("Registered MIDI input drivers: %s\n", MidiInputDeviceFactory::AvailableDriversAsString().c_str())); dmsg(1,("Registered audio output drivers: %s\n", AudioOutputDeviceFactory::AvailableDriversAsString().c_str())); @@ -125,7 +128,7 @@ while (true) { if (bPrintStatistics) { - std::set engines = EngineFactory::EngineInstances(); + const std::set& engines = EngineFactory::EngineInstances(); std::set::iterator itEngine = engines.begin(); for (int i = 0; itEngine != engines.end(); itEngine++, i++) { Engine* pEngine = *itEngine; @@ -219,7 +222,7 @@ } void kill_app() { - kill(main_thread, SIGKILL); + kill(main_pid, SIGKILL); } void parse_options(int argc, char **argv) {