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

Windows: closing pod-ui while downloading programs from PocketPOD leaves the app hanging #12

Closed
arteme opened this issue Oct 12, 2022 · 1 comment
Milestone

Comments

@arteme
Copy link
Owner

arteme commented Oct 12, 2022

image

If the app is closed using the "x" button while the PocketPOD is sending its programs, the app will become unresponsive and needs to be killed. Only applicable to Windows WinMM build, WinRT build seems to behave like pod-ui on other platforms, correctly closing the app.

@arteme arteme added this to the v0.7.1 milestone Oct 12, 2022
@arteme
Copy link
Owner Author

arteme commented Oct 12, 2022

Looks like the blame is on the PocketPOD drivers... When closing Midi input, midir will call midiInReset, then midiInStop then more logic and finally midiInClose.

There are many different code samples: https://cpp.hotexamples.com/examples/-/-/midiInStop/cpp-midiinstop-function-examples.html all calling these functions in a different order. Also, examples of broken drivers: LMMS/lmms#3920

Either way, calling either midiInReset or midiInStop hangs and never returns.

arteme added a commit that referenced this issue Oct 13, 2022
…g WinMM

Implemented logic for PocketPOD when using WinMM back-end to wait for 1 second
of quiet on the MIDI in port before closing, otherwise the app hangs (see #12).

This also changes a Quit UI event into a two-step ShutDown (which triggers MIDI
ports closing) and Quit (once the MIDI ports are closed).
@arteme arteme closed this as completed Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant