summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorAndré Nusser <andre.nusser@googlemail.com>2016-04-22 10:58:40 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-04-22 10:58:40 +0200
commitec9f9cfe169f7fca3083b5792f9d72dbf3af7f08 (patch)
tree3f3eb56501ec7e49f4589a24a0fc0196f589ef30 /src/drumgizmo.h
parent0571c71aa9fb91adbd246a91a27dd607effad76b (diff)
A little refactoring for drumgizmo.cc (premium non-breaking changes)
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index 7af5dbb..13c657d 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -42,9 +42,7 @@
#include "configfile.h"
#include "settings.h"
-#define MAX_NUM_CHANNELS 64
#define REFSFILE "refs.conf"
-#define RESAMPLER_INPUT_BUFFER 64
class DrumGizmo
{
@@ -73,6 +71,11 @@ public:
void setFreeWheel(bool freewheel);
+private:
+ static const int MAX_NUM_CHANNELS = 64;
+ static const int RESAMPLER_OUTPUT_BUFFER = 4096;
+ static const int RESAMPLER_INPUT_BUFFER = 64;
+
protected:
DrumKitLoader loader;
@@ -85,7 +88,7 @@ protected:
std::list< Event* > activeevents[MAX_NUM_CHANNELS];
CHResampler resampler[MAX_NUM_CHANNELS];
- sample_t resampler_output_buffer[MAX_NUM_CHANNELS][4096];
+ sample_t resampler_output_buffer[MAX_NUM_CHANNELS][RESAMPLER_OUTPUT_BUFFER];
sample_t resampler_input_buffer[MAX_NUM_CHANNELS][RESAMPLER_INPUT_BUFFER];
std::map<std::string, AudioFile *> audiofiles;