]> git.sesse.net Git - nageru/blobdiff - futatabi/midi_mapper.h
Add a MIDI mapping editor for Futatabi.
[nageru] / futatabi / midi_mapper.h
index c1d6639858d1c697795692e05f16d6883a5263db..b3549feffe54e15cdfa068beb12eb12ab325f455 100644 (file)
@@ -83,6 +83,10 @@ public:
                current_highlighted_camera = stream_idx;
                refresh_lights();
        }
+       void set_speed_light(float speed) {  // Goes from 0.0 to 2.0.
+               current_speed = speed;
+               refresh_lights();
+       }
 
        // MIDIReceiver.
        void controller_received(int controller, int value) override;
@@ -98,7 +102,6 @@ private:
        void update_lights_lock_held();
 
        std::atomic<bool> should_quit{false};
-       int should_quit_fd;
 
        mutable std::mutex mu;
        ControllerReceiver *receiver;  // Under <mu>.
@@ -111,6 +114,7 @@ private:
        std::atomic<LightState> play_enabled_light{Off};
        std::atomic<LightState> locked_light{On};
        std::atomic<int> current_highlighted_camera{-1};
+       std::atomic<float> current_speed{1.0f};
 
        MIDIDevice midi_device;
 };