summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2019-06-16 10:47:33 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2019-06-16 10:47:33 +0200
commit25b398ea000b5529084d985bd14ed066a81578d3 (patch)
tree301d8eef0b212d60f5f5939d088f2492b5c1b3f0 /src/drumgizmo.h
parent37c2ec6edd2294a31561b4cd46ded6a2b4f74e22 (diff)
Make max channnel count controllable through the configure script to make it possible to exceed the default 16.
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index 4592143..9d2e661 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -26,6 +26,8 @@
*/
#pragma once
+#include <config.h>
+
#include <string>
#include <list>
#include <array>
@@ -74,7 +76,6 @@ public:
void setRandomSeed(unsigned int seed);
private:
- static constexpr int MAX_NUM_CHANNELS = 64;
static constexpr int MAX_RESAMPLER_BUFFER_SIZE = 4096 * 8;
protected:
@@ -83,7 +84,7 @@ protected:
AudioOutputEngine& oe;
AudioInputEngine& ie;
- std::list< Event* > activeevents[MAX_NUM_CHANNELS];
+ std::list< Event* > activeevents[NUM_CHANNELS];
bool enable_resampling{true};
@@ -101,8 +102,8 @@ protected:
SettingsGetter settings_getter;
Random rand;
- std::array<Resampler, MAX_NUM_CHANNELS> zita;
- std::array<std::unique_ptr<sample_t>, MAX_NUM_CHANNELS> resampler_input_buffer;
+ std::array<Resampler, NUM_CHANNELS> zita;
+ std::array<std::unique_ptr<sample_t>, NUM_CHANNELS> resampler_input_buffer;
double ratio = 1.0;
};