Turning off MIDI keyboard during use as audio input leaves open audio stream in Windows
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.3k
- Avg merge
- 2d 13h
- Merged PRs (30d)
- 7
Description
Bug Summary
I have a Casio LK-94TV that I'm using as a MIDI device on my Windows 10 machine running LMMS 1.2.2. When I turn the keyboard off while it is actively selected as an input MIDI device via the WinMM driver and close LMMS, it will leave an active audio stream open. This is generally not noticeable to the end user, but it does prevent Windows from sleeping. This can be verified using powercfg -requests:
C:\WINDOWS\system32>powercfg -requests
DISPLAY:
None.
SYSTEM:
[DRIVER] Realtek High Definition Audio (HDAUDIO\FUNC_01&VEN_10EC&DEV_1220&SUBSYS_1458A182&REV_1000\5&5e7edb7&0&0001)
An audio stream is currently in use.
[DRIVER] CASIO USB MIDI (USB\VID_07CF&PID_6802\7&36e288da&0&2)
An audio stream is currently in use.
AWAYMODE:
None.
EXECUTION:
None
PERFBOOST:
None.
ACTIVELOCKSCREEN:
None.
It is possible to create many active audio streams that cannot be closed without restarting the computer.
Steps to reproduce
- Start LMMS with my keyboard on.
- Attach the keyboard to an instrument. Verify notes can be played.
- Turn off the keyboard while it’s being used as a MIDI input.
- Close LMMS and run
powercfg -requests.
Expected behavior
There should be no active audio streams from the MIDI device after shutdown.
Actual behavior
There are active audio streams that are not closed and cannot be killed (as far as I know).
Affected LMMS versions
1.2.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the shutdown sequence with the WinMM MIDI device on Windows 10, then verify the leaked streams with powercfg -requests. Investigate the MIDI device shutdown path in LMMS and confirm the work is done when closing LMMS leaves no active audio streams from the MIDI device.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- audio-video-rtc, desktop
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100