2 |
* * |
* * |
3 |
* LinuxSampler - modular, streaming capable sampler * |
* LinuxSampler - modular, streaming capable sampler * |
4 |
* * |
* * |
5 |
* Copyright (C) 2003 by Benno Senoner and Christian Schoenebeck * |
* Copyright (C) 2003, 2004 by Benno Senoner and Christian Schoenebeck * |
6 |
* * |
* * |
7 |
* This program is free software; you can redistribute it and/or modify * |
* This program is free software; you can redistribute it and/or modify * |
8 |
* 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 * |
36 |
#include <stdio.h> |
#include <stdio.h> |
37 |
|
|
38 |
#include <string> |
#include <string> |
39 |
|
#include <sstream> |
40 |
|
|
41 |
#ifdef HAVE_CONFIG_H |
#ifdef HAVE_CONFIG_H |
42 |
# include <config.h> |
# include <config.h> |
43 |
#endif |
#endif |
44 |
|
|
45 |
#define LS_DEBUG_LEVEL 2 ///< the higher this value the higher verbosity, 0 means no debug messages at all |
#define LS_DEBUG_LEVEL 1 ///< the higher this value the higher verbosity, 0 means no debug messages at all |
46 |
|
|
47 |
#if LS_DEBUG_LEVEL > 0 |
#if LS_DEBUG_LEVEL > 0 |
48 |
# define dmsg(debuglevel,x) if (LS_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);} |
# define dmsg(debuglevel,x) if (LS_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);} |
81 |
String message; ///< detailed warning or error message |
String message; ///< detailed warning or error message |
82 |
}; |
}; |
83 |
|
|
84 |
|
template<class T> inline String ToString(T o) { |
85 |
|
std::stringstream ss; |
86 |
|
ss << o; |
87 |
|
return ss.str(); |
88 |
|
} |
89 |
|
|
90 |
#endif // __GLOBAL_H__ |
#endif // __GLOBAL_H__ |