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 - 2019 Christian Schoenebeck * |
* Copyright (C) 2005 - 2020 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 * |
43 |
# define dmsg(debuglevel,x) |
# define dmsg(debuglevel,x) |
44 |
#endif // CONFIG_DEBUG_LEVEL > 0 |
#endif // CONFIG_DEBUG_LEVEL > 0 |
45 |
|
|
46 |
|
#define _strfy(s) #s |
47 |
|
#define strfy(s) _strfy(s) |
48 |
|
|
49 |
#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") |
#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") |
50 |
|
|
51 |
/// defines globally the bit depth of used samples |
/// defines globally the bit depth of used samples |
111 |
} |
} |
112 |
|
|
113 |
inline std::string ltrim(std::string s) { |
inline std::string ltrim(std::string s) { |
114 |
s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); |
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { |
115 |
|
return !std::isspace(ch); |
116 |
|
})); |
117 |
return s; |
return s; |
118 |
} |
} |
119 |
|
|
120 |
inline std::string rtrim(std::string s) { |
inline std::string rtrim(std::string s) { |
121 |
s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end()); |
s.erase(std::find_if(s.rbegin(), s.rend(), [](int ch) { |
122 |
|
return !std::isspace(ch); |
123 |
|
}).base(), s.end()); |
124 |
return s; |
return s; |
125 |
} |
} |
126 |
|
|
151 |
int hexToNumber(char hex_digit); |
int hexToNumber(char hex_digit); |
152 |
int hexsToNumber(char hex_digit0, char hex_digit1 = '0'); |
int hexsToNumber(char hex_digit0, char hex_digit1 = '0'); |
153 |
|
|
154 |
|
std::string backtraceAsString(); |
155 |
|
|
156 |
#endif // __LS_GLOBAL_PRIVATE_H__ |
#endif // __LS_GLOBAL_PRIVATE_H__ |