Skip to content

fix(audio/windows): set waveformat when needed#1460

Open
HarmfulBreeze wants to merge 2 commits into
ClassicOldSong:masterfrom
HarmfulBreeze:master
Open

fix(audio/windows): set waveformat when needed#1460
HarmfulBreeze wants to merge 2 commits into
ClassicOldSong:masterfrom
HarmfulBreeze:master

Conversation

@HarmfulBreeze
Copy link
Copy Markdown

The waveformat should not be set on every client connection, as it could stop the audio sessions for some games (like Slay the Spire).

This PR addresses this issue by adding a simple cache map meant to remember device_id <-> waveformat associations, and only changing the waveformat if needed.

The waveformat should not be set on every client connection, as it could stop the audio sessions for some games (like Slay the Spire).
This patch addresses this issue by adding a simple cache map meant to remember device_id <-> waveformat associations, and only changing the waveformat if needed.
@HarmfulBreeze HarmfulBreeze changed the title fix(audio): set waveformat when needed fix(audio/windows): set waveformat when needed Apr 14, 2026
@HarmfulBreeze
Copy link
Copy Markdown
Author

@ClassicOldSong friendly bump :)

Comment thread src/platform/windows/audio.cpp
@ClassicOldSong
Copy link
Copy Markdown
Owner

Sorry I was really busy recently and I forgot to take a look afterwards...

@HarmfulBreeze
Copy link
Copy Markdown
Author

It's fine, no worries. :)

Thanks for your feedback. I reverted the error logging in default_device, I think it made sense to me to remove it at the time, as I wanted to make the caller check for it since it now returns an std::optional. But I never went ahead and lifted the error handling so... yeah

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

Successfully merging this pull request may close these issues.

2 participants