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 DEVMODE 1 ///< in development mode we do some extra sanity checks here and there, so if LS is stable this can be disabled to improve efficiency |
46 |
|
|
47 |
|
#define USE_EXCEPTIONS 0 ///< wether if we should use exceptions in the _REALTIME_THREAD_ for runtime critical errors or force segfaults instead |
48 |
|
|
49 |
#define LS_DEBUG_LEVEL 1 ///< 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 |
50 |
|
|
51 |
#if LS_DEBUG_LEVEL > 0 |
#if LS_DEBUG_LEVEL > 0 |
60 |
/// Defines how many event objects the modulation system allocates |
/// Defines how many event objects the modulation system allocates |
61 |
#define MAX_EVENTS_PER_FRAGMENT 1024 |
#define MAX_EVENTS_PER_FRAGMENT 1024 |
62 |
|
|
63 |
|
#define EMMS __asm__ __volatile__ ("emms" ::: "st", "st(1)", "st(2)", "st(3)", "st(4)", "st(5)", "st(6)", "st(7)", "mm0", "mm1", "mm2", "mm3", "mm4", "mm5", "mm6", "mm7") |
64 |
|
|
65 |
/// defines globally the bit depth of used samples |
/// defines globally the bit depth of used samples |
66 |
typedef int16_t sample_t; |
typedef int16_t sample_t; |
67 |
|
|
87 |
String message; ///< detailed warning or error message |
String message; ///< detailed warning or error message |
88 |
}; |
}; |
89 |
|
|
90 |
|
template<class T> inline String ToString(T o) { |
91 |
|
std::stringstream ss; |
92 |
|
ss << o; |
93 |
|
return ss.str(); |
94 |
|
} |
95 |
|
|
96 |
#endif // __GLOBAL_H__ |
#endif // __GLOBAL_H__ |