ValveSoftware / ValveSoftware/wine
MMDevAPI: IAudioSessionEnumerator returns nonsense session count and leaks memory
Nobody has claimed this yet.
- Dominant language
- C
- Stars
- 2k
- Forks
- 488
- PR merge metrics
- No merged PRs in 30d
Description
Changes introduced in Add implementation for IAudioSessionEnumerator are preventing Special K from working.
The previous stub implementation was fine, but with the introduction of the session enumerator, Special K cannot be used in any game without leaking memory and quickly crashing (unless I activate a Wine-specific workaround added in Special K 24.10.19).
Here is the implementation of Special K's session enumeration if it helps. This works just fine on Windows with no leaks or the crazy number of sessions returned by IAudioSessionEnumerator::GetCount (...).
While reviewing the changes above, I noticed a problem with the Critical Section guarding the session list.
Critical Section guarding audio sessions is entered twice, never exited.
2762b7a
I think the second sessions_lock () should be sessions_unlock ()
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 with the implementation introduced by commit 2762b7a and trace IAudioSessionEnumerator::GetCount and the session-list locking, using Special K's linked session-enumeration code as a behavioral reference. Done means the count is sensible, enumeration no longer leaks or causes crashes, and the critical section is balanced; no test file is named in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100