Skip to content

Only read microphone from steam if we requested it - #11697

Open
boxrocket6803 wants to merge 1 commit into
Facepunch:masterfrom
boxrocket6803:multiple-instance-mic
Open

Only read microphone from steam if we requested it#11697
boxrocket6803 wants to merge 1 commit into
Facepunch:masterfrom
boxrocket6803:multiple-instance-mic

Conversation

@boxrocket6803

@boxrocket6803 boxrocket6803 commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

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

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

@joshuascript

joshuascript commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Desperately needed and the proposed fix is dead simple. great work.

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.

Using the voice transmitter with two local clients transmits voice on both clients

2 participants