#pragma once #include #include // Defaults static const int CLICK_NOTE = 37; static const int CLICK_CHANNEL = 4; extern const char *device; // playback device const snd_pcm_sframes_t nframes = 1024; // ~1/44th sec buffer size const unsigned int f_sample = 44100; 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 { public: Config(); ~Config(); // signals boost::signals2::signal signal_mode; boost::signals2::signal signal_channel; boost::signals2::signal signal_note; boost::signals2::signal signal_bpm; int get_midi_channel(); void set_midi_channel(int channel); int get_midi_note(); void set_midi_note(int note); int get_bpm(); void set_bpm(int bpm); int get_mode(); void set_mode(int mode); void recover(); void persist(); private: int m_midi_channel; int m_midi_note; int m_bpm; int m_mode; };