Commit c41a647c authored by minus's avatar minus

Add encoder buttons

parent a4dcd27b
......@@ -94,16 +94,6 @@ int main(int argc, char *argv[]) {
pa();
// create PA watch object for sink name "mpd pulse"
// with a callback function on change (info, sinks)
// register this object with PA
// has a reference to the ALSA button to change the light
// ALSA button/encoder mapping contains a reference to the PA watch
// object, as well as the button/encoder number and a callback.
// on change from MIDI side, the callback is executed and passed the
// MIDI action as well as the mapping struct with the PA watch reference
GMainLoop *main_loop = g_main_loop_new(NULL, FALSE);
g_main_loop_run(main_loop);
g_main_loop_unref(main_loop);
......
......@@ -27,6 +27,15 @@ enum button {
// layer buttons
LAYERA = 84,
LAYERB = 85,
// encoder press
ENCPRESS1 = 32,
ENCPRESS2 = 33,
ENCPRESS3 = 34,
ENCPRESS4 = 35,
ENCPRESS5 = 36,
ENCPRESS6 = 37,
ENCPRESS7 = 38,
ENCPRESS8 = 39,
};
enum button_led_state {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment