diff options
| author | Roxie Linden <roxie@lindenlab.com> | 2026-06-30 11:48:27 -0700 |
|---|---|---|
| committer | Roxie Linden <roxie@lindenlab.com> | 2026-07-07 10:15:11 -0700 |
| commit | 4124f969ee7bbd4e0734ef0d118c60125d7bb358 (patch) | |
| tree | e26780486a49936788ce005049a93aa238b92ad7 /indra/newview/llvoicewebrtc.cpp | |
| parent | 95120bc676fc68793da2d4c06542cf7cb3272d00 (diff) | |
Keep capture device running for the whole voice session
Mute now zeroes captured gain and disables the sender tracks instead of
stopping the capture device, so unmuting no longer cold-starts the AEC
(no hiss) and Bluetooth devices no longer drop/restart as they switch
between mono and stereo.
Capture is gated on voice being enabled rather than on mute: it starts
when voice is enabled and runs across calls and mute/unmute, and is
released when voice is disabled (setVoiceEnabled). Playout stays gated on
there being a connection to render. As a result the OS "mic in use"
indicator is on for the length of the session and only clears when voice
is disabled.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'indra/newview/llvoicewebrtc.cpp')
| -rw-r--r-- | indra/newview/llvoicewebrtc.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llvoicewebrtc.cpp b/indra/newview/llvoicewebrtc.cpp index ecf963039f..126d22924b 100644 --- a/indra/newview/llvoicewebrtc.cpp +++ b/indra/newview/llvoicewebrtc.cpp @@ -1711,6 +1711,14 @@ void LLWebRTCVoiceClient::setVoiceEnabled(bool enabled) mVoiceEnabled = enabled; LLVoiceClientStatusObserver::EStatusType status; + // Gate the audio devices on voice being enabled: the capture mic and + // playout speaker only run while voice is on, and the mic isn't held + // open when voice is off. + if (mWebRTCDeviceInterface) + { + mWebRTCDeviceInterface->setVoiceEnabled(enabled); + } + if (enabled) { LL_DEBUGS("Voice") << "enabling" << LL_ENDL; |
