From 624a69994d89c71b1ce59dd3b2117a235400be2f Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Sat, 4 Jan 2025 13:55:09 +0100 Subject: No virtual clicks --- Click.h | 24 +++++------------------- 1 file changed, 5 insertions(+), 19 deletions(-) (limited to 'Click.h') diff --git a/Click.h b/Click.h index 4af693e..6d3d871 100644 --- a/Click.h +++ b/Click.h @@ -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 signal_bpm; -- cgit v1.2.3