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

MMDevAPI: IAudioSessionEnumerator returns nonsense session count and leaks memory #260

Open
Kaldaien opened this issue Oct 19, 2024 · 0 comments

Comments

@Kaldaien
Copy link

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 ()

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