summaryrefslogtreecommitdiffhomepage
path: root/config.h
diff options
context:
space:
mode:
authorRoland Reichwein <mail@reichwein.it>2025-01-04 10:25:25 +0100
committerRoland Reichwein <mail@reichwein.it>2025-01-04 10:25:25 +0100
commitaaafcea7e26791acbf5b9612e3fb396edcdfcc8f (patch)
tree63131edf7b2eafe404a01e7ae01e2680d5f1b1e8 /config.h
parent9351c6d9812523b0b8027f2b2e0de54c27004bc2 (diff)
Fill UI
Diffstat (limited to 'config.h')
-rw-r--r--config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/config.h b/config.h
index 07d3819..5d2a1d0 100644
--- a/config.h
+++ b/config.h
@@ -1,5 +1,6 @@
#pragma once
+#include <boost/signals2.hpp>
#include <alsa/asoundlib.h>
// Defaults
@@ -12,6 +13,7 @@ const int log_lines = 10;
const int default_bpm = 120;
const int pcm_latency_us = 100000;
const int click_latency_frames = 10000;
+const int default_mode = 0; // 0 = note, 1 = clock, 2 = internal
class Config
{
@@ -19,6 +21,12 @@ public:
Config();
~Config();
+ // signals
+ boost::signals2::signal<void(int)> signal_mode;
+ boost::signals2::signal<void(int)> signal_channel;
+ boost::signals2::signal<void(int)> signal_note;
+ boost::signals2::signal<void(int)> signal_bpm;
+
int get_midi_channel();
void set_midi_channel(int channel);
@@ -28,6 +36,9 @@ public:
int get_bpm();
void set_bpm(int bpm);
+ int get_mode();
+ void set_mode(int mode);
+
void recover();
void persist();
@@ -35,4 +46,5 @@ private:
int m_midi_channel;
int m_midi_note;
int m_bpm;
+ int m_mode;
};