summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2018-08-08 17:52:46 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2018-08-08 17:52:46 +0200
commit8fac5fb3ac631f430e8181f7fb471faf7ebbb76a (patch)
tree1527a3883d7fb996cabcde1708ad0c312240645a /src/drumgizmo.h
parent400959b536180cf8912f06dd80b4de077d8f8c74 (diff)
Remove old CHReampler class.
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index 2f74062..4592143 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -29,6 +29,7 @@
#include <string>
#include <list>
#include <array>
+#include <memory>
#include <zita-resampler/resampler.h>
@@ -74,8 +75,7 @@ public:
private:
static constexpr int MAX_NUM_CHANNELS = 64;
- static constexpr int RESAMPLER_OUTPUT_BUFFER = 4096;
- static constexpr int RESAMPLER_INPUT_BUFFER = 2048;//64;
+ static constexpr int MAX_RESAMPLER_BUFFER_SIZE = 4096 * 8;
protected:
DrumKitLoader loader;
@@ -101,8 +101,8 @@ protected:
SettingsGetter settings_getter;
Random rand;
- Resampler zita[MAX_NUM_CHANNELS];
- sample_t _resampler_input_buffer[MAX_NUM_CHANNELS][4096 * 8];
+ std::array<Resampler, MAX_NUM_CHANNELS> zita;
+ std::array<std::unique_ptr<sample_t>, MAX_NUM_CHANNELS> resampler_input_buffer;
double ratio = 1.0;
};