summaryrefslogtreecommitdiff
path: root/indra/llwebrtc/llwebrtc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llwebrtc/llwebrtc.cpp')
-rw-r--r--indra/llwebrtc/llwebrtc.cpp48
1 files changed, 15 insertions, 33 deletions
diff --git a/indra/llwebrtc/llwebrtc.cpp b/indra/llwebrtc/llwebrtc.cpp
index 06a5c3a085..ee85a254f2 100644
--- a/indra/llwebrtc/llwebrtc.cpp
+++ b/indra/llwebrtc/llwebrtc.cpp
@@ -476,40 +476,22 @@ void LLWebRTCImpl::OnDevicesUpdated()
void LLWebRTCImpl::setTuningMode(bool enable)
{
- mWorkerThread->BlockingCall(
- [this, enable]()
- {
- if (enable)
- {
-
- mTuningDeviceModule->StartRecording();
-
- if (mPeerDeviceModule)
- {
- mPeerDeviceModule->StopRecording();
- }
- }
- else
- {
- mTuningDeviceModule->StartRecording();
- if (mPeerDeviceModule)
- {
- mPeerDeviceModule->StartRecording();
- }
- }
- });
- for (auto& connection : mPeerConnections)
- {
- if (enable)
+ mSignalingThread->PostTask(
+ [this, enable]
{
- connection->enableSenderTracks(false);
- }
- else
- {
- connection->resetMute();
- }
- connection->enableReceiverTracks(!enable);
- }
+ for (auto &connection : mPeerConnections)
+ {
+ if (enable)
+ {
+ connection->enableSenderTracks(false);
+ }
+ else
+ {
+ connection->resetMute();
+ }
+ connection->enableReceiverTracks(!enable);
+ }
+ });
}
float LLWebRTCImpl::getTuningAudioLevel() { return -20 * log10f(mTuningAudioDeviceObserver->getMicrophoneEnergy()); }