00001
00002
00003
00004 #ifndef _GAPE_CONSTS_H
00005 #define _GAPE_CONSTS_H
00006
00007 #include "Object.h"
00008 #include <qpixmap.h>
00009 #include <qevent.h>
00010 #include <qobject.h>
00011 #include <qstring.h>
00012
00013 #define GAPE_REDRAW_EVENT 21380//this is my birthday, which is a very important number!
00014 #define GAPE_GLOBAL_REDRAW_EVENT 53153//Happy birthday Dad!
00015
00016
00017 #define GAPE_DEFAULT_GROUP_CAPACITY 8
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028 #define GAPE_RT_IO_BUFFER_SIZE 256
00029
00030
00031 #define GAPE_DEFAULT_NUM_CHANNELS 1
00032 #define GAPE_NFFT_LENGTH 2048
00033
00034
00035
00036
00037
00038 #define GAPE_MAX_NUM_CHANNELS 16
00039
00040
00041 #define GAPE_ERROR_FILE "error.txt"
00042
00043
00044 #define GAPE_DEFAULT_NUM_CONTROLLERS 3
00045
00046
00047
00048
00049
00066 #define GapeFloat MY_FLOAT
00067
00068
00069
00080 #define GapeIntSample short
00081
00082
00083
00084
00085
00096 class GapeConsts {
00097 public:
00101 enum PlaybackMode {LOOPING,ONEPLAY};
00102
00106 enum TickMode {SEQUENTIAL,PARALLEL};
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00123 static void reportError(const char* error);
00124
00129 static GapeIntSample floatToInt(GapeFloat value) {
00130 return ((GapeIntSample) (value * 32767));
00131 }
00132
00137 static GapeFloat IntToFloat(GapeIntSample value) {
00138 return (((GapeFloat) value) / 32768);
00139 }
00140
00148 static void** expandArray(void** array, int* oldCapacity, int factor = 2);
00149
00150
00157 static int sampleRate;
00158
00169 static int updateMutexPeriod;
00170
00171 };
00172
00173
00181 class GapeRedrawEvent : public QCustomEvent {
00182 public:
00183 GapeRedrawEvent()
00184 : QCustomEvent( GAPE_REDRAW_EVENT ) {}
00185 };
00186
00187
00188
00189
00190
00191
00192
00193
00194
00195
00196
00553 #endif
00554