summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authordeva <deva>2011-07-15 13:02:33 +0000
committerdeva <deva>2011-07-15 13:02:33 +0000
commitcd0e36773992e26985bdec1f7a5341f83fa3e521 (patch)
tree4710fb3f2465f4b464f5f6176261a67cfde2e46e /src/drumgizmo.h
parente190d38057892b69246391841b234a368bc2b4ad (diff)
New input/output plugin architecture. New LV2 plugin.
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h36
1 files changed, 14 insertions, 22 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index 4c6683b..1bdb5b5 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -30,20 +30,19 @@
#include <string>
#include <list>
-#include "drumkit.h"
-#include "audio.h"
-#include "event.h"
+#include "audiooutputengine.h"
+#include "audioinputengine.h"
-#include "channelmixer.h"
+#include "events.h"
+#include "audiofile.h"
+#include "drumkit.h"
-class AudioOutputEngine;
-class AudioInputEngine;
+#define MAX_NUM_CHANNELS 512
class DrumGizmo {
public:
- DrumGizmo(AudioOutputEngine &outputengine,
- AudioInputEngine &inputengine,
- ChannelMixer &mixer);
+ DrumGizmo(AudioOutputEngine *outputengine,
+ AudioInputEngine *inputengine);
~DrumGizmo();
bool loadkit(const std::string &kitfile);
@@ -51,29 +50,22 @@ public:
bool init(bool preload = true);
void run();
+ void run(size_t pos, sample_t *samples, size_t nsamples);
void stop();
- void pre(size_t sz);
- void getSamples(Channel *c, sample_t *s, size_t sz);
- void post(size_t sz);
+ void getSamples(int ch, int pos, sample_t *s, size_t sz);
bool isRunning() { return is_running; }
- Channels channels;
- ChannelMixer mixer;
-
- EventQueue eventqueue;
-
private:
bool is_running;
- AudioOutputEngine &oe;
- AudioInputEngine &ie;
+ AudioOutputEngine *oe;
+ AudioInputEngine *ie;
- std::list< Event* > activeevents[100];
- timepos_t time;
+ std::list< Event* > activeevents[MAX_NUM_CHANNELS];
- AudioFiles audiofiles;
+ std::map<std::string, AudioFile *> audiofiles;
#ifdef TEST_DRUMGIZMO
public: