diff options
author | Roxie Linden <roxie@lindenlab.com> | 2023-12-08 12:09:02 -0800 |
---|---|---|
committer | Roxie Linden <roxie@lindenlab.com> | 2024-02-22 23:11:36 -0800 |
commit | 2a375d25dc2bb6e063d8e596ce3b4bd2c61cd96b (patch) | |
tree | f168514ac98b9c83da11e9570481280327d9b3dc /indra | |
parent | 4d37d1c32f7998b45786dd2de596019b6ba3269d (diff) |
fix device selection (hopefully)
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwebrtc/llwebrtc.cpp | 17 | ||||
-rw-r--r-- | indra/llwebrtc/llwebrtc_impl.h | 1 |
2 files changed, 16 insertions, 2 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp index 32a75d3675..12997e34d3 100644 --- a/indra/llwebrtc/llwebrtc.cpp +++ b/indra/llwebrtc/llwebrtc.cpp @@ -300,10 +300,10 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id) { mTuningDeviceModule->StartPlayout(); } - renderDeviceCount = mPeerDeviceModule->PlayoutDevices(); if (mPeerDeviceModule) { + renderDeviceCount = mPeerDeviceModule->PlayoutDevices(); for (int16_t i = 0; i < renderDeviceCount; i++) { char name[webrtc::kAdmMaxDeviceNameSize]; @@ -317,6 +317,7 @@ void LLWebRTCImpl::setRenderDevice(const std::string &id) break; } } + mPeerDeviceModule->StopPlayout(); mPeerDeviceModule->SetPlayoutDevice(mPlayoutDevice); mPeerDeviceModule->InitSpeaker(); mPeerDeviceModule->InitPlayout(); @@ -379,7 +380,14 @@ void LLWebRTCImpl::setTuningMode(bool enable) }); for (auto& connection : mPeerConnections) { - connection->enableSenderTracks(enable ? false : !mMute); + if (enable) + { + connection->enableSenderTracks(false); + } + else + { + connection->resetMute(); + } connection->enableReceiverTracks(!enable); } } @@ -620,6 +628,11 @@ void LLWebRTCPeerConnectionImpl::setMute(bool mute) } } +void LLWebRTCPeerConnectionImpl::resetMute() +{ + setMute(mMute); +} + void LLWebRTCPeerConnectionImpl::setReceiveVolume(float volume) { mWebRTCImpl->PostSignalingTask( diff --git a/indra/llwebrtc/llwebrtc_impl.h b/indra/llwebrtc/llwebrtc_impl.h index cc22c30f35..6a84f67ef5 100644 --- a/indra/llwebrtc/llwebrtc_impl.h +++ b/indra/llwebrtc/llwebrtc_impl.h @@ -273,6 +273,7 @@ class LLWebRTCPeerConnectionImpl : public LLWebRTCPeerConnection, void OnMessage(const webrtc::DataBuffer& buffer) override; // Helpers + void resetMute(); void enableSenderTracks(bool enable); void enableReceiverTracks(bool enable); |