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 - 2007 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 * |
21 |
* MA 02111-1307 USA * |
* MA 02111-1307 USA * |
22 |
***************************************************************************/ |
***************************************************************************/ |
23 |
|
|
24 |
// All application global declarations are defined here. |
// All application global declarations that HAVE to be exposed to the C++ |
25 |
|
// API are defined here. |
26 |
|
|
27 |
#ifndef __GLOBAL_H__ |
#ifndef __LS_GLOBAL_H__ |
28 |
#define __GLOBAL_H__ |
#define __LS_GLOBAL_H__ |
|
|
|
|
//#define DEBUG_HEADERS 1 |
|
|
|
|
|
#if DEBUG_HEADERS |
|
|
# warning global.h included |
|
|
#endif // DEBUG_HEADERS |
|
29 |
|
|
30 |
#include <stdlib.h> |
#include <stdlib.h> |
31 |
#include <stdint.h> |
#include <stdint.h> |
33 |
|
|
34 |
#include <string> |
#include <string> |
35 |
|
|
|
#ifdef HAVE_CONFIG_H |
|
|
# include <config.h> |
|
|
#endif |
|
|
|
|
|
#define LS_DEBUG_LEVEL 2 ///< the higher this value the higher verbosity, 0 means no debug messages at all |
|
|
|
|
|
#if LS_DEBUG_LEVEL > 0 |
|
|
# define dmsg(debuglevel,x) if (LS_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);} |
|
|
#else |
|
|
# define dmsg(debuglevel,x) |
|
|
#endif // LS_DEBUG |
|
|
|
|
|
/// Defines the max. pitch value used in the application (in octaves) |
|
|
#define MAX_PITCH 4 |
|
|
|
|
|
/// Defines how many event objects the modulation system allocates |
|
|
#define MAX_EVENTS_PER_FRAGMENT 1024 |
|
|
|
|
|
/// defines globally the bit depth of used samples |
|
|
typedef int16_t sample_t; |
|
|
|
|
36 |
typedef std::string String; |
typedef std::string String; |
37 |
|
|
38 |
/** |
#endif // __LS_GLOBAL_H__ |
|
* Wether a function / method call was successful, or if warnings or even an |
|
|
* error occured. |
|
|
*/ |
|
|
enum result_type_t { |
|
|
result_type_success, |
|
|
result_type_warning, |
|
|
result_type_error |
|
|
}; |
|
|
|
|
|
/** |
|
|
* Used whenever a detailed description of the result of a function / method |
|
|
* call is needed. |
|
|
*/ |
|
|
struct result_t { |
|
|
result_type_t type; ///< success, warning or error |
|
|
int code; ///< warning or error code |
|
|
String message; ///< detailed warning or error message |
|
|
}; |
|
|
|
|
|
#endif // __GLOBAL_H__ |
|