upgrade to libremidi 5.1, raylib and raygui latest

This commit is contained in:
Sebastian @ HfG
2025-06-13 19:06:09 +02:00
parent bd642576bb
commit 96bd5f30e6
112 changed files with 6484 additions and 1946 deletions
@@ -61,7 +61,7 @@ struct shared_handler : public libremidi::shared_context
{
auto clt = std::make_shared<shared_handler>(client_name);
auto cb = [client = std::weak_ptr{clt}](const libremidi::alsa_seq::poll_parameters& params) {
auto cb = [client = std::weak_ptr{clt}](libremidi::alsa_seq::poll_parameters params) {
if (auto clt = client.lock())
{
clt->events.push(
@@ -74,8 +74,7 @@ struct shared_handler : public libremidi::shared_context
auto stop_cb = [client = std::weak_ptr{clt}](snd_seq_addr_t id) {
if (auto clt = client.lock())
{
clt->events.push(
{.type = shared_handler::event_type::callback_removed, .payload = std::move(id)});
clt->events.push({.type = shared_handler::event_type::callback_removed, .payload = id});
clt->queue_event.notify();
}
return true;
@@ -134,7 +133,7 @@ struct shared_handler : public libremidi::shared_context
break;
}
case callback_removed:
auto addr = std::move(*std::get_if<snd_seq_addr_t>(&ev.payload));
auto addr = *std::get_if<snd_seq_addr_t>(&ev.payload);
if (auto index = index_of_address(addr); index >= 0)
{
addresses.erase(addresses.begin() + index);
@@ -146,15 +145,14 @@ struct shared_handler : public libremidi::shared_context
}
// Look for who's ready
for (int64_t i = 0, N = std::ssize(fds) - 2; i < N; i++)
for (int64_t i = 0, n = std::ssize(fds) - 2; i < n; i++)
{
if (fds[i].revents & POLLIN)
{
// Read alsa event
snd_seq_event_t* ev{};
event_handle handle{snd};
int result = 0;
while ((result = snd.seq.event_input(client, &ev)) > 0)
while (snd.seq.event_input(client, &ev) > 0)
{
handle.reset(ev);