MCPcopy Create free account
hub / github.com/celtera/libremidi / main

Function main

examples/lookup.cpp:45–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45int 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}

Callers

nothing calls this directly

Calls 1

lookup_apiFunction · 0.85

Tested by

no test coverage detected