Skip to content

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

@Kaldaien

Description

@Kaldaien

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions