#pragma once #include "common.hpp" #include "midi.hpp" #include #pragma GCC diagnostic push #ifndef __clang__ #pragma GCC diagnostic ignored "-Wsuggest-override" #endif #include #pragma GCC diagnostic pop namespace rack { struct RtMidiInputDevice : midi::InputDevice { RtMidiIn *rtMidiIn; RtMidiInputDevice(int driverId, int deviceId); ~RtMidiInputDevice(); }; struct RtMidiDriver : midi::Driver { int driverId; /** Just for querying MIDI driver information */ RtMidiIn *rtMidiIn; RtMidiOut *rtMidiOut; std::map devices; RtMidiDriver(int driverId); ~RtMidiDriver(); std::string getName() override; std::vector getInputDeviceIds() override; std::string getInputDeviceName(int deviceId) override; midi::InputDevice *subscribeInputDevice(int deviceId, midi::Input *input) override; void unsubscribeInputDevice(int deviceId, midi::Input *input) override; }; void rtmidiInit(); } // namespace rack