summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 10:34:21 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2015-05-22 10:34:21 +0200
commitbef1d5542f926a3b942374707dd56041013d35ff (patch)
tree71161b4239db1de08d5a3ee60399a596490f3486 /src/drumgizmo.h
parentacf59a4f960b3e45db566675551b8158b47e1554 (diff)
Added framesize control mechanism to the engine, and made us of it in the cachemanager and drumkitloader.
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h21
1 files changed, 7 insertions, 14 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index a8f007a..4c0740e 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -24,8 +24,7 @@
* along with DrumGizmo; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*/
-#ifndef __DRUMGIZMO_DRUMGIZMO_H__
-#define __DRUMGIZMO_DRUMGIZMO_H__
+#pragma once
#include <string>
#include <list>
@@ -52,6 +51,7 @@
#define MAX_NUM_CHANNELS 64
#define REFSFILE "refs.conf"
+#define RESAMPLER_INPUT_BUFFER 64
class DrumGizmo : public MessageReceiver {
public:
@@ -62,10 +62,6 @@ public:
bool init();
- /**
- * @param endpos number of samples to process, -1 := never stop.
- */
- void run(int endpos);
bool run(size_t pos, sample_t *samples, size_t nsamples);
void stop();
@@ -79,6 +75,8 @@ public:
int samplerate();
void setSamplerate(int samplerate);
+ void setFrameSize(size_t framesize);
+
private:
DrumKitLoader loader;
@@ -92,17 +90,12 @@ private:
CHResampler resampler[MAX_NUM_CHANNELS];
sample_t resampler_output_buffer[MAX_NUM_CHANNELS][4096];
- sample_t resampler_input_buffer[MAX_NUM_CHANNELS][64];
+ sample_t resampler_input_buffer[MAX_NUM_CHANNELS][RESAMPLER_INPUT_BUFFER];
std::map<std::string, AudioFile *> audiofiles;
CacheManager cacheManager;
-
-#ifdef TEST_DRUMGIZMO
-public:
-#endif
DrumKit kit;
-};
-
-#endif/*__DRUMGIZMO_DRUMGIZMO_H__*/
+ size_t framesize;
+};