From 94d33d51ee136d88a2d81bfce47efd2836e845d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Gl=C3=B6ckner?= Date: Tue, 29 Mar 2016 11:01:21 +0200 Subject: Refactored class BeatMapper --- src/beatmapper.h | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'src/beatmapper.h') 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 @@ -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__*/ -- cgit v1.2.3