microsoft / microsoft/MIDI

[BUG]: `midiOutOpen` takes additional apx 10ms with WMS enabled

Open
#892 1 comment 0 reactions 1 assignee View on GitHub

@Psychlist1972 is already working on this.

Since Feb 28, 2026.

area-winmm bug :lady_beetle:
Dominant language
C++
Stars
679
Forks
72
Avg merge
4h 51m
Merged PRs (30d)
59

Description

Windows Version

25H2 26200.7922

Service Installation Method

Other (please indicate below)

SDK version, if appropriate

No SDK installed

Location

Application using WinMM MIDI 1.0 (Classic API)

Type of bug

Performance not as expected

Steps to reproduce
  1. prepare loopback virtual device (for example, loopMIDI);
  2. call midiOutOpen on the out endpoint.

More info in the Additional notes field.

Expected behavior

midiOutOpen executes for several (< 10) milliseconds.

Additional notes

In my library (DryWetMIDI) I have a function which prepares output MIDI device via classic midiOutOpen function. I call this function on the first event sending. And I have the test:

  1. prepare loopback virtual device (loopMIDI);
  2. send an event to the out endpoint;
  3. receive the event on the in endpoint;
  4. expecting event receiving within 10 ms after sending.

Before Windows MIDI Services (WMS) has become enabled the test passed every time. But since WMS enabled, it's always failing. Event received, but with delay of 14-17 ms on my PC. I started to go step by step in debugger to see what is become slow and it's midiOutOpen function.

I know that it's not a good test to rely on timing things, but it's required in my case. And yes, I can increase timeout up to 20 ms. And yes, I can call midiOutOpen before sending (and it's probably correct). But I believe midiOutOpen should not be slower with WMS enabled.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.