Only read microphone from steam if we requested it - #11697
Open
boxrocket6803 wants to merge 1 commit into
Open
Conversation
Contributor
|
Desperately needed and the proposed fix is dead simple. great work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Multiple instances of the game will try to read steam microphone input at once, which did not produce any useable audio. This adds a check so that it only attempts to get microphone input on instances that are actually trying to record.
Both instances could still be set to record at the same time if the user has their mic always open (which would bring back the audio issues) but at least for push to talk this works in a more sane way.
Motivation & Context
Annoying when trying to test voice chat.
Fixes: #3137
Implementation Details
Sets a bool when VoiceManager requests that steam start recording. The game will only attempt to read microphone input from steam while the bool is set. The bool is cleared once IsListening and IsRecording are both false (recording has been stopped and it's been 0.2 seconds since we've received audio from steam). I don't believe there are any instances where steam would start sending audio again after a 0.2 second delay with recording stopped.
Videos
With both instances fighting over the microphone input it sounds like this. Note both instances show the mic icon despite only pressing push to talk on one of them.
2026-08-20.20-21-18.mp4
With the added check microphone activation is separate per instance and the signal is clean.
2026-08-21.21-08-09.mp4
Checklist