| 43 | } |
| 44 | |
| 45 | int main() |
| 46 | { |
| 47 | #if defined(_WIN32) && __has_include(<winrt/base.h>) |
| 48 | // Necessary for using WinUWP and WinMIDI, must be done as early as possible in your main() |
| 49 | winrt::init_apartment(); |
| 50 | #endif |
| 51 | |
| 52 | // This will find the port that is closest to this. |
| 53 | // For instance, given a Launchpad and a Launchpad Mini, |
| 54 | // the launchpad will be returned. Otherwise, the mini will be returned. |
| 55 | libremidi::input_port searched{{.port_name = "launchpad"}}; |
| 56 | |
| 57 | for (auto& api : libremidi::available_apis()) |
| 58 | lookup_api(api, searched); |
| 59 | for (auto& api : libremidi::available_ump_apis()) |
| 60 | lookup_api(api, searched); |
| 61 | return 0; |
| 62 | } |
nothing calls this directly
no test coverage detected