diff options
Diffstat (limited to 'Click.h')
-rw-r--r-- | Click.h | 24 |
1 files changed, 5 insertions, 19 deletions
@@ -5,30 +5,20 @@ #include "config.h" #include "BPMDetect.h" -// Virtual base class -// Abstraction of BPM detection / setting -class Click -{ -public: - Click(){} - virtual ~Click(){} -}; - // Internally generated // Configured via: BPM -class InternalClick: public Click +class InternalClick { public: - InternalClick(Config& config): m_bpm(config.get_bpm()){} - virtual ~InternalClick(){} + InternalClick(Config& config): m_config(config){} private: - int m_bpm; + Config& m_config; }; // Generated from MIDI notes // Configured via channel and note to listen to -class NoteClick: public Click +class NoteClick { public: // signals @@ -43,8 +33,6 @@ public: m_detect.signal_bpm.connect([&](int bpm){signal_bpm(bpm);}); } - virtual ~NoteClick(){} - // slots void receive_note(int channel, int note, uint64_t timestamp) { @@ -64,7 +52,7 @@ private: }; // Generated from MIDI Clock -class ClockClick: public Click +class ClockClick { public: ClockClick(): m_detect(24) @@ -72,8 +60,6 @@ public: m_detect.signal_bpm.connect([&](int bpm){signal_bpm(bpm);}); } - virtual ~ClockClick(){} - // signals boost::signals2::signal<void(int)> signal_bpm; |