summaryrefslogtreecommitdiff
path: root/src/beatmapper.h
diff options
context:
space:
mode:
authorChristian Glöckner <cgloeckner@freenet.de>2016-03-29 11:01:21 +0200
committerAndré Nusser <andre.nusser@googlemail.com>2016-03-31 17:35:47 +0200
commit94d33d51ee136d88a2d81bfce47efd2836e845d0 (patch)
tree9a27e8ac61cf3872386f9d4d154cfb1dfd2b0b0c /src/beatmapper.h
parent13b5fabc8c3722e7e30b22d50f44e2a3bba3ef11 (diff)
Refactored class BeatMapper
Diffstat (limited to 'src/beatmapper.h')
-rw-r--r--src/beatmapper.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/src/beatmapper.h b/src/beatmapper.h
index fde1988..405b3d6 100644
--- a/src/beatmapper.h
+++ b/src/beatmapper.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_BEATMAPPER_H__
-#define __DRUMGIZMO_BEATMAPPER_H__
+#pragma once
#include <jack/jack.h>
@@ -36,19 +35,18 @@
#define HISTORY_SIZE 200
-class BeatMapper {
+class BeatMapper
+{
public:
- BeatMapper(Instrument *instrument);
+ BeatMapper(const Instrument& instrument);
- Sample *map(jack_nframes_t nframes);
+ Sample* map(jack_nframes_t nframes);
private:
- Instrument *instrument;
- float hist[HISTORY_SIZE];
- float C;
+ const Instrument& instrument;
+ float hist[HISTORY_SIZE];
+ float C;
- size_t mindist;
- size_t last;
+ size_t mindist;
+ size_t last;
};
-
-#endif/*__DRUMGIZMO_BEATMAPPER_H__*/