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 Christian Schoenebeck * |
* 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 * |
23 |
|
|
24 |
// All application global declarations are defined here. |
// All application global declarations are defined here. |
25 |
|
|
26 |
#ifndef __GLOBAL_H__ |
#ifndef __LS_GLOBAL_H__ |
27 |
#define __GLOBAL_H__ |
#define __LS_GLOBAL_H__ |
28 |
|
|
29 |
#include <stdlib.h> |
#include <stdlib.h> |
30 |
#include <stdint.h> |
#include <stdint.h> |
33 |
#include <string> |
#include <string> |
34 |
#include <sstream> |
#include <sstream> |
35 |
|
|
36 |
#ifdef HAVE_CONFIG_H |
#if HAVE_CONFIG_H |
37 |
# include <config.h> |
# include <config.h> |
38 |
#endif |
#endif |
39 |
|
|
|
// Make sure all mandatory configuration macros are defined. |
|
|
// We don't care about optional configuration macros though. |
|
|
#ifndef CONFIG_MAX_PITCH |
|
|
# error "Configuration macro CONFIG_MAX_PITCH not defined!" |
|
|
#endif // CONFIG_MAX_PITCH |
|
|
#ifndef CONFIG_MAX_EVENTS_PER_FRAGMENT |
|
|
# error "Configuration macro CONFIG_MAX_EVENTS_PER_FRAGMENT not defined!" |
|
|
#endif // CONFIG_MAX_EVENTS_PER_FRAGMENT |
|
|
#ifndef CONFIG_EG_BOTTOM |
|
|
# error "Configuration macro CONFIG_EG_BOTTOM not defined!" |
|
|
#endif // CONFIG_EG_BOTTOM |
|
|
#ifndef CONFIG_EG_MIN_RELEASE_TIME |
|
|
# error "Configuration macro CONFIG_EG_MIN_RELEASE_TIME not defined!" |
|
|
#endif // CONFIG_EG_MIN_RELEASE_TIME |
|
|
#ifndef CONFIG_REFILL_STREAMS_PER_RUN |
|
|
# error "Configuration macro CONFIG_REFILL_STREAMS_PER_RUN not defined!" |
|
|
#endif // CONFIG_REFILL_STREAMS_PER_RUN |
|
|
#ifndef CONFIG_STREAM_MIN_REFILL_SIZE |
|
|
# error "Configuration macro CONFIG_STREAM_MIN_REFILL_SIZE not defined!" |
|
|
#endif // CONFIG_STREAM_MIN_REFILL_SIZE |
|
|
#ifndef CONFIG_STREAM_MAX_REFILL_SIZE |
|
|
# error "Configuration macro CONFIG_STREAM_MAX_REFILL_SIZE not defined!" |
|
|
#endif // CONFIG_STREAM_MAX_REFILL_SIZE |
|
|
#ifndef CONFIG_STREAM_BUFFER_SIZE |
|
|
# error "Configuration macro CONFIG_STREAM_BUFFER_SIZE not defined!" |
|
|
#endif // CONFIG_STREAM_BUFFER_SIZE |
|
|
#ifndef CONFIG_MAX_STREAMS |
|
|
# error "Configuration macro CONFIG_MAX_STREAMS not defined!" |
|
|
#endif // CONFIG_MAX_STREAMS |
|
|
#ifndef CONFIG_MAX_VOICES |
|
|
# error "Configuration macro CONFIG_MAX_VOICES not defined!" |
|
|
#endif // CONFIG_MAX_VOICES |
|
|
#ifndef CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
|
|
# error "Configuration macro CONFIG_DEFAULT_SUBFRAGMENT_SIZE not defined!" |
|
|
#endif // CONFIG_DEFAULT_SUBFRAGMENT_SIZE |
|
|
#ifndef CONFIG_VOICE_STEAL_ALGO |
|
|
# error "Configuration macro CONFIG_VOICE_STEAL_ALGO not defined!" |
|
|
#endif // CONFIG_VOICE_STEAL_ALGO |
|
|
#ifndef CONFIG_SYSEX_BUFFER_SIZE |
|
|
# error "Configuration macro CONFIG_SYSEX_BUFFER_SIZE not defined!" |
|
|
#endif // CONFIG_SYSEX_BUFFER_SIZE |
|
|
#ifndef CONFIG_FILTER_CUTOFF_MIN |
|
|
# error "Configuration macro CONFIG_FILTER_CUTOFF_MIN not defined!" |
|
|
#endif // CONFIG_FILTER_CUTOFF_MIN |
|
|
#ifndef CONFIG_FILTER_CUTOFF_MAX |
|
|
# error "Configuration macro CONFIG_FILTER_CUTOFF_MAX not defined!" |
|
|
#endif // CONFIG_FILTER_CUTOFF_MAX |
|
|
|
|
40 |
#if CONFIG_DEBUG_LEVEL > 0 |
#if CONFIG_DEBUG_LEVEL > 0 |
41 |
# define dmsg(debuglevel,x) if (CONFIG_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);} |
# define dmsg(debuglevel,x) if (CONFIG_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);} |
42 |
#else |
#else |
76 |
return ss.str(); |
return ss.str(); |
77 |
} |
} |
78 |
|
|
79 |
#endif // __GLOBAL_H__ |
class Runnable { |
80 |
|
public: |
81 |
|
virtual ~Runnable() { } |
82 |
|
virtual void Run() = 0; |
83 |
|
}; |
84 |
|
|
85 |
|
extern double GLOBAL_VOLUME; |
86 |
|
|
87 |
|
#endif // __LS_GLOBAL_H__ |