microsoft / MIDI

Windows MIDI Services
MIT License
285 stars 23 forks source link

[BUG] Cannot open a same port from a Win32 app and midi.exe #229

Open tkmymzk-ymh opened 5 months ago

tkmymzk-ymh commented 5 months ago

Describe the bug When using both a Win32 app and midi.exe, it is not possible to open the same port simultaneously.

To Reproduce

  1. Connect a MIDI 1.0 keyboard (such as KORG nanoKEY2) to your PC.
  2. Start midi.exe. midi.exe will recognize the MIDI port and receive MIDI messages from the keyboard.
  3. Start another Win32 App (such as Pocket MIDI, https://apps.microsoft.com/detail/9NTV7MFLBBVX).
  4. Select the same port on Pocket MIDI.
  5. A message “Port opened failed” will be displayed.

A similar error occurs when you start Pocket MIDI first.

Expected behavior Both apps using different API should be able to open the same port at the same time.

Screenshots None

Installer Name or Version Preview 4 Daily 2

Additional context This issue may be related to the comment about multi-client support in the API Backward Compatibility section of the README, which states "It is possible we will add multi-client support here after our initial release."

Psychlist1972 commented 5 months ago

Thanks for the report. This is a known limitation until we re-plumb the older APIs to use Windows MIDI Services. (It's on the backlog). Until that time, the only way to have multi-client is for all apps to use the new API.

Multi-client is implemented at the service level. The older WinMM and WinRT MIDI 1.0 APIs go straight to the driver.

Issue #34

tkmymzk-ymh commented 5 months ago

@Psychlist1972 Understood. Thank you for the information!

Psychlist1972 commented 1 month ago

Related to #49