/[svn]/linuxsampler/trunk/src/common/global.h
ViewVC logotype

Diff of /linuxsampler/trunk/src/common/global.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 319 by schoenebeck, Mon Dec 13 00:46:42 2004 UTC revision 554 by schoenebeck, Thu May 19 19:25:14 2005 UTC
# Line 3  Line 3 
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                              *
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  *
# Line 25  Line 26 
26  #ifndef __GLOBAL_H__  #ifndef __GLOBAL_H__
27  #define __GLOBAL_H__  #define __GLOBAL_H__
28    
 //#define DEBUG_HEADERS 1  
   
 #if DEBUG_HEADERS  
 # warning global.h included  
 #endif // DEBUG_HEADERS  
   
29  #include <stdlib.h>  #include <stdlib.h>
30  #include <stdint.h>  #include <stdint.h>
31  #include <stdio.h>  #include <stdio.h>
# Line 39  Line 34 
34  #include <sstream>  #include <sstream>
35    
36  #ifdef HAVE_CONFIG_H  #ifdef HAVE_CONFIG_H
37  #  include <config.h>  # include <config.h>
38  #endif  #endif
39    
40  #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  // Make sure all mandatory configuration macros are defined.
41    // We don't care about optional configuration macros though.
42  #define USE_EXCEPTIONS  0  ///< wether if we should use exceptions in the _REALTIME_THREAD_ for runtime critical errors or force segfaults instead  #ifndef CONFIG_MAX_PITCH
43    # error "Configuration macro CONFIG_MAX_PITCH not defined!"
44    #endif // CONFIG_MAX_PITCH
45    #ifndef CONFIG_MAX_EVENTS_PER_FRAGMENT
46    # error "Configuration macro CONFIG_MAX_EVENTS_PER_FRAGMENT not defined!"
47    #endif // CONFIG_MAX_EVENTS_PER_FRAGMENT
48    #ifndef CONFIG_EG_BOTTOM
49    # error "Configuration macro CONFIG_EG_BOTTOM not defined!"
50    #endif // CONFIG_EG_BOTTOM
51    #ifndef CONFIG_EG_MIN_RELEASE_TIME
52    # error "Configuration macro CONFIG_EG_MIN_RELEASE_TIME not defined!"
53    #endif // CONFIG_EG_MIN_RELEASE_TIME
54    #ifndef CONFIG_REFILL_STREAMS_PER_RUN
55    # error "Configuration macro CONFIG_REFILL_STREAMS_PER_RUN not defined!"
56    #endif // CONFIG_REFILL_STREAMS_PER_RUN
57    #ifndef CONFIG_STREAM_MIN_REFILL_SIZE
58    # error "Configuration macro CONFIG_STREAM_MIN_REFILL_SIZE not defined!"
59    #endif // CONFIG_STREAM_MIN_REFILL_SIZE
60    #ifndef CONFIG_STREAM_MAX_REFILL_SIZE
61    # error "Configuration macro CONFIG_STREAM_MAX_REFILL_SIZE not defined!"
62    #endif // CONFIG_STREAM_MAX_REFILL_SIZE
63    #ifndef CONFIG_STREAM_BUFFER_SIZE
64    # error "Configuration macro CONFIG_STREAM_BUFFER_SIZE not defined!"
65    #endif // CONFIG_STREAM_BUFFER_SIZE
66    #ifndef CONFIG_MAX_STREAMS
67    # error "Configuration macro CONFIG_MAX_STREAMS not defined!"
68    #endif // CONFIG_MAX_STREAMS
69    #ifndef CONFIG_MAX_VOICES
70    # error "Configuration macro CONFIG_MAX_VOICES not defined!"
71    #endif // CONFIG_MAX_VOICES
72    #ifndef CONFIG_VOICE_STEAL_ALGO
73    # error "Configuration macro CONFIG_VOICE_STEAL_ALGO not defined!"
74    #endif // CONFIG_VOICE_STEAL_ALGO
75    #ifndef CONFIG_SYSEX_BUFFER_SIZE
76    # error "Configuration macro CONFIG_SYSEX_BUFFER_SIZE not defined!"
77    #endif // CONFIG_SYSEX_BUFFER_SIZE
78    #ifndef CONFIG_FILTER_UPDATE_STEPS
79    # error "Configuration macro CONFIG_FILTER_UPDATE_STEPS not defined!"
80    #endif // CONFIG_FILTER_UPDATE_STEPS
81    #ifndef CONFIG_FILTER_CUTOFF_MIN
82    # error "Configuration macro CONFIG_FILTER_CUTOFF_MIN not defined!"
83    #endif // CONFIG_FILTER_CUTOFF_MIN
84    #ifndef CONFIG_FILTER_CUTOFF_MAX
85    # error "Configuration macro CONFIG_FILTER_CUTOFF_MAX not defined!"
86    #endif // CONFIG_FILTER_CUTOFF_MAX
87    
88  #define LS_DEBUG_LEVEL  1  ///< the higher this value the higher verbosity, 0 means no debug messages at all  #if CONFIG_DEBUG_LEVEL > 0
89    #  define dmsg(debuglevel,x)    if (CONFIG_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);}
 #if LS_DEBUG_LEVEL > 0  
 #  define dmsg(debuglevel,x)    if (LS_DEBUG_LEVEL >= debuglevel) {printf x; fflush(stdout);}  
90  #else  #else
91  #  define dmsg(debuglevel,x)  #  define dmsg(debuglevel,x)
92  #endif // LS_DEBUG  #endif // CONFIG_DEBUG_LEVEL > 0
   
 /// 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  
93    
94  #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")
95    

Legend:
Removed from v.319  
changed lines
  Added in v.554

  ViewVC Help
Powered by ViewVC