diff options
author | Roland Reichwein <mail@reichwein.it> | 2025-01-04 13:55:09 +0100 |
---|---|---|
committer | Roland Reichwein <mail@reichwein.it> | 2025-01-04 13:55:09 +0100 |
commit | 624a69994d89c71b1ce59dd3b2117a235400be2f (patch) | |
tree | 76a5b3a149a0e1c40d17742fe21629455528a5e4 /Click.h | |
parent | 39ec820c931b07bc0cec98add36f106a5965e137 (diff) |
No virtual clicks
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; |