summaryrefslogtreecommitdiff
path: root/src/drumgizmo.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 14:58:41 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2016-01-28 14:58:41 +0100
commit413c0703722835e48b98b85b8ded32f1f43555bb (patch)
tree9d195d00c020ed96e1a5ad2a10ed8e044d7623a9 /src/drumgizmo.h
parent2087facd3727c52069ad65c5b791f24cba3101a2 (diff)
Style fixes
Diffstat (limited to 'src/drumgizmo.h')
-rw-r--r--src/drumgizmo.h62
1 files changed, 32 insertions, 30 deletions
diff --git a/src/drumgizmo.h b/src/drumgizmo.h
index 1e38e08..98cd287 100644
--- a/src/drumgizmo.h
+++ b/src/drumgizmo.h
@@ -53,52 +53,54 @@
#define REFSFILE "refs.conf"
#define RESAMPLER_INPUT_BUFFER 64
-class DrumGizmo : public MessageReceiver {
+class DrumGizmo
+ : public MessageReceiver
+{
public:
- DrumGizmo(AudioOutputEngine *outputengine, AudioInputEngine *inputengine);
- virtual ~DrumGizmo();
+ DrumGizmo(AudioOutputEngine *outputengine, AudioInputEngine *inputengine);
+ virtual ~DrumGizmo();
- bool loadkit(std::string kitfile);
+ bool loadkit(std::string kitfile);
- bool init();
+ bool init();
- bool run(size_t pos, sample_t *samples, size_t nsamples);
- void stop();
+ bool run(size_t pos, sample_t *samples, size_t nsamples);
+ void stop();
- void getSamples(int ch, int pos, sample_t *s, size_t sz);
+ void getSamples(int ch, int pos, sample_t *s, size_t sz);
- std::string configString();
- bool setConfigString(std::string cfg);
+ std::string configString();
+ bool setConfigString(std::string cfg);
- void handleMessage(Message *msg);
+ void handleMessage(Message *msg);
- int samplerate();
- void setSamplerate(int samplerate);
+ int samplerate();
+ void setSamplerate(int samplerate);
- void setFrameSize(size_t framesize);
+ void setFrameSize(size_t framesize);
- void setFreeWheel(bool freewheel);
+ void setFreeWheel(bool freewheel);
-private:
- DrumKitLoader loader;
+protected:
+ DrumKitLoader loader;
- Mutex mutex;
- bool is_stopping; ///< Is set to true when a TYPE_STOP event has been seen.
+ Mutex mutex;
+ bool is_stopping; ///< Is set to true when a TYPE_STOP event has been seen.
- AudioOutputEngine *oe;
- AudioInputEngine *ie;
+ AudioOutputEngine *oe;
+ AudioInputEngine *ie;
- std::list< Event* > activeevents[MAX_NUM_CHANNELS];
+ std::list< Event* > activeevents[MAX_NUM_CHANNELS];
- CHResampler resampler[MAX_NUM_CHANNELS];
- sample_t resampler_output_buffer[MAX_NUM_CHANNELS][4096];
- sample_t resampler_input_buffer[MAX_NUM_CHANNELS][RESAMPLER_INPUT_BUFFER];
+ CHResampler resampler[MAX_NUM_CHANNELS];
+ sample_t resampler_output_buffer[MAX_NUM_CHANNELS][4096];
+ sample_t resampler_input_buffer[MAX_NUM_CHANNELS][RESAMPLER_INPUT_BUFFER];
- std::map<std::string, AudioFile *> audiofiles;
+ std::map<std::string, AudioFile *> audiofiles;
- AudioCache audioCache;
- DrumKit kit;
+ AudioCache audioCache;
+ DrumKit kit;
- size_t framesize;
- bool freewheel;
+ size_t framesize;
+ bool freewheel;
};