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-2016 Christian Schoenebeck * |
* Copyright (C) 2005-2017 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 * |
56 |
// inet_aton seems missing under WIN32 |
// inet_aton seems missing under WIN32 |
57 |
#ifndef INADDR_NONE |
#ifndef INADDR_NONE |
58 |
#define INADDR_NONE 0xffffffff |
#define INADDR_NONE 0xffffffff |
|
typedef unsigned long in_addr_t; |
|
59 |
#endif |
#endif |
60 |
|
|
61 |
|
typedef unsigned long in_addr_t; |
62 |
|
|
63 |
int inet_aton(const char *cp, struct in_addr *addr) |
int inet_aton(const char *cp, struct in_addr *addr) |
64 |
{ |
{ |
65 |
addr->s_addr = inet_addr(cp); |
addr->s_addr = inet_addr(cp); |
123 |
|
|
124 |
dmsg(1,("LinuxSampler %s\n", VERSION)); |
dmsg(1,("LinuxSampler %s\n", VERSION)); |
125 |
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")); |
126 |
dmsg(1,("Copyright (C) 2005-2016 Christian Schoenebeck\n")); |
dmsg(1,("Copyright (C) 2005-2017 Christian Schoenebeck\n")); |
127 |
dmsg(1,("Binary built: " __DATE__ "\n")) |
dmsg(1,("Binary built: " __DATE__ "\n")) |
128 |
|
|
129 |
#if defined(WIN32) |
#if defined(WIN32) |
340 |
int option_index = 0; |
int option_index = 0; |
341 |
static struct option long_options[] = |
static struct option long_options[] = |
342 |
{ |
{ |
343 |
{"help",0,0,0}, |
{"help",no_argument,0,0}, |
344 |
{"version",0,0,0}, |
{"version",no_argument,0,0}, |
345 |
{"profile",0,0,0}, |
{"profile",no_argument,0,0}, |
346 |
{"no-tune",0,0,0}, |
{"no-tune",no_argument,0,0}, |
347 |
{"statistics",0,0,0}, |
{"statistics",no_argument,0,0}, |
348 |
{"instruments-db-location",1,0,0}, |
{"instruments-db-location",required_argument,0,0}, |
349 |
{"create-instruments-db",1,0,0}, |
{"create-instruments-db",optional_argument,0,0}, |
350 |
{"lscp-addr",1,0,0}, |
{"lscp-addr",required_argument,0,0}, |
351 |
{"lscp-port",1,0,0}, |
{"lscp-port",required_argument,0,0}, |
352 |
{"stacktrace",0,0,0}, |
{"stacktrace",no_argument,0,0}, |
353 |
{"exec-after-init",1,0,0}, |
{"exec-after-init",required_argument,0,0}, |
354 |
{0,0,0,0} |
{0,0,0,0} |
355 |
}; |
}; |
356 |
|
|
431 |
case 6: // --create-instruments-db |
case 6: // --create-instruments-db |
432 |
#if HAVE_SQLITE3 |
#if HAVE_SQLITE3 |
433 |
try { |
try { |
434 |
if (optarg) { |
std::cout << "Creating instruments database..." << std::endl; |
435 |
std::cout << "Creating instruments database..." << std::endl; |
if (optarg) |
436 |
InstrumentsDb::CreateInstrumentsDb(String(optarg)); |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(String(optarg)); |
437 |
std::cout << "Done" << std::endl; |
else |
438 |
} |
InstrumentsDb::GetInstrumentsDb()->CreateInstrumentsDb(); // use default instruments db location |
439 |
|
std::cout << "Done" << std::endl; |
440 |
} catch(Exception e) { |
} catch(Exception e) { |
441 |
std::cerr << e.Message() << std::endl; |
std::cerr << e.Message() << std::endl; |
442 |
exit(EXIT_FAILURE); |
exit(EXIT_FAILURE); |