Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] 10+ second delay to get function blocks from a virtual device app #560

Open
Psychlist1972 opened this issue Feb 25, 2025 · 3 comments
Assignees
Labels
bug 🐞 Something isn't working needs-investigation 🔍 Needs to be investigated before considering or solving.

Comments

@Psychlist1972
Copy link
Contributor

Reported on Discord by Reuben Thomas (JUCE):

I'm testing on Win11 Canary Build 27788.rs_prerelease.250131-1609.

In the process of trying to get virtual MIDI up and running, I've written a small(ish) demo that creates a virtual endpoint device, then opens a connection to the endpoint and installs the virtual device as a client processing plugin. The app also lists all MIDI devices, including virtual devices, so this list should include the app's own virtual device.

The first time I launch the app, the virtual connection shows up with no Function Block information, but this appears after a delay. The delay is much longer than for a hardware device, more than 10 seconds. On subsequent launches, the function blocks never show up, although the device itself does. So, it seems like the system UMP endpoint cache isn't getting updated, or isn't notifying the app after being updated. If I close my demo app, manually restart the MIDI Service, and then reopen my app, the function blocks are listed correctly again (though there's still a 10 second delay). Is this a known issue?

@Psychlist1972 Psychlist1972 added the bug 🐞 Something isn't working label Feb 25, 2025
@Psychlist1972 Psychlist1972 self-assigned this Feb 25, 2025
@Psychlist1972 Psychlist1972 added the needs-investigation 🔍 Needs to be investigated before considering or solving. label Feb 25, 2025
@Psychlist1972
Copy link
Contributor Author

I wonder if this is the initial discovery process wait period. I'll need to check to see if the virtual device is providing everything that is expected. If not, then it's likely this timeout you're seeing. The same timeout is used with hardware.

@Psychlist1972
Copy link
Contributor Author

Virtual device sends everything that is required, so this is likely a mismatch between declared function block count and actual provided function block count.

There's no real reason to require apps to provide both a list of the function blocks and a count of them. Considering automatically updating the declared count with the provided count (could also remove the declared count, but that will break SDK compatibility so need to consider carefully)

@Psychlist1972
Copy link
Contributor Author

Psychlist1972 commented Feb 27, 2025

This needs re-testing with the upcoming Canary release in a week or two. The Function Block handling code in that was updated due to some issues in the previous public release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐞 Something isn't working needs-investigation 🔍 Needs to be investigated before considering or solving.
Projects
Status: No status
Development

No branches or pull requests

1 participant