Commit Graph

163 Commits (bbc2ad8fc50b2efb19a40a2db57043690addc492)

Author SHA1 Message Date
Jonathan "Geenz" Goodman bbc2ad8fc5 Merge remote-tracking branch 'origin/main' into geenz/main-to-develop 2025-10-17 17:06:39 -04:00
Andrey Kleshchev 57a9e51360 #4819 WebRTC crashes after a failed login 2025-10-13 21:19:24 +03:00
Andrey Kleshchev f846861f04 #4777 Fix webrtc crashing in worker threads on shutdown 2025-10-03 19:07:00 +03:00
Andrey Kleshchev 1d9f87df4f #4695 Fix device update causing a crash 2025-09-22 22:02:45 +03:00
Andrey Kleshchev bf0f60039b #4691 Log WebRTC termination
for diagnostic purposes
2025-09-17 17:54:35 +03:00
Roxanne Skelly a6d4c1d394
[WebRTC] Rework device handling sequence so that we can handle unplugging/re-plugging devices (#4593)
* [WebRTC] Rework device handling sequence so that we can handle unplugging/re-plugging devices

The device handling was not processing device updates in the proper sequence as
things like AEC use both input and output devices.  Devices like headsets are both
so unplugging them resulted in various mute conditions and sometimes even a crash.

Now, we update both capture and render devices at once in the proper sequence.

Test Guidance:
* Bring two users in the same place in webrtc regions.
* The 'listening' one should have a headset or something set oas 'Default'
* Press 'talk' on one, and verify the other can hear.
* Unplug the headset from the listening one.
* Validate that audio changes from the headset to the speakers.
* Plug the headset back in.
* Validate that audio changes from speakers to headset.
* Do the same type of test with the headset viewer talking.
* The microphone used should switch from the headset to the computer (it should have one)

Do other various device tests, such as setting devices explicitly, messing with the device selector, etc.

* Fix race condition when multiple change device requests might come in at once

* Update to m137

The primary feature of this commit is to update libwebrtc from m114
to m137.  This is needed to make webrtc buildable, as m114 is not buildable
by the current toolset.

m137 had some changes to the API, which required renaming or changing namespace
of some of the calls.

Additionally, this PR moves from a callback mechanism for gathering the energy
levels for tuning to a wrapper AudioDeviceModule, which gives us more control
over the audio stream.

Finally, the new m137-based webrtc has been updated to allow for 192khz audio
streams.

* Properly pass the observer setting into the inner audio device module

* Update to m137 and get rid of some noise

    This change updates to m137 from m114, which required a few API changes.

    Additionally, this fixes the hiss that happens shortly after someone unmutes: https://github.com/secondlife/server/issues/2094

    There was also an issue with a slight amount of repeated after unmuting if there was audio right before unmuting.  This is because
    the audio processing and buffering still had audio from the previous speaking session.  Now, we inject nearly a half second of
    silence into the audio buffers/processor after unmuting to flush things.

* Install nsis on windows

* Use the newer digital AGC pipeline

m137 improved the AGC pipeline and the existing analog style is going away
so move to the new digital pipeline.

Also, some tweaking for audio levels so that we don't see inworld bars when tuning,
so one's own bars seem a reasonable size, etc.

* Install NSIS during windows sisgning and package build step

* Try pinning the packaging to windows 2022 to deal with missing nsis

* Adjust gain calculation and audio level calculations for tuning and peer connections

* Update with mac universal webrtc build

* Tuning of voice indicators for both tuning mode and inworld for self.

* Redo device deployment to handle cases where multiple deploy requests pile up

Also, mute when leaving webrtc-enabled regions or parcels,
and unmute when voice comes back.

* pre commit issue
2025-09-12 20:07:51 -04:00
Rye ba30737d8f Merge branch 'develop' of github.com:secondlife/viewer into rye/infinitemac 2025-08-20 18:04:55 -04:00
Andrey Kleshchev 6f072c2121
Merge 2025.06 into develop
Merge 2025.06 into develop
2025-08-14 11:17:35 +03:00
Roxie Linden f7f06063c7 Fix issue where p2p calls were coming up muted even thought the UI said they were not. 2025-08-12 20:32:09 +03:00
Ansariel f03cd219a9 Fix clang compiler issues due to unused variables 2025-08-12 14:09:53 +00:00
Roxie Linden bab2c12d04 Straighten out muting to prevent echo when crossing from vivox to webrtc regions.
Muting was a bit random in the code, so it's now been straightened out and should
prevent echo.

Also, code was added to not attempt connection to non-webrtc regions in the webrtc code.
2025-08-08 14:37:46 -07:00
Andrey Kleshchev be04175579 #4358 Fix 'Microphone in use' task bar icon
1. set_enabled(false) failed to apply, force set it to trigger observers
and remove the icon
2. Don't set audio devices if voice was disabled
2025-07-16 20:05:23 +03:00
Seth Alves 4cff6997a1 reuse region variable instead of multiple calls to gAgent.getRegion() 2025-05-09 09:54:47 -07:00
Seth Alves be0fff8121 adjust which webrtc tracks are enabled when the avatar crosses a region border 2025-05-09 09:14:46 -07:00
Jonathan "Geenz" Goodman 52cca995cc Merge branch 'release/2025.04' into rye/forevermac 2025-04-15 13:55:01 -04:00
Andrey Kleshchev 6ac1d4f3e3 #3829 WebRTC crash OnDataReceivedImpl 2025-03-27 21:29:31 +02:00
Andrey Lihatskiy ddbe1ff981 Fix xcode16 build errors 2025-02-13 17:30:08 +02:00
Rye 635c34a17b Fix build with C++20 including nat's changes to fsyspath 2025-02-11 05:04:04 -05:00
Maxim Nikolenko 1924241f04
viewer-private#375 add more logging in attempt to get more info 2025-02-07 19:00:20 +02:00
Andrey Kleshchev 0114be2c15 viewer#2985 Odd crash when notifying voice observers
Crash points at enableDisableCallBtn, but button's floater was cleaned
earlier and has a removeObserver call so an observer record should be
long gone. Likely something else is going on.
Went over various callbacks and made sure they are cleaned. But in case
floater somehow remained, added mSession = nullptr.
2024-11-01 17:54:05 +02:00
Roxie Linden 743a1a6d8e fix trailing whitespace 2024-09-18 14:14:26 -07:00
Roxie Linden 52091a6097 Mute other / set volume level for other is not working.
As part of the boost::json conversion, the json that mutes and sets peer gain
was not being formed correctly.

Also, tweaked the peer gain default.
2024-09-18 13:01:43 -07:00
Roxanne Skelly 1894136e9a
Merge pull request #2543 from secondlife/roxie/webrtc-285
mute icons were not showing during group call when user was muted
2024-09-12 09:46:20 -07:00
Roxie Linden f78b43bd1d Fix issue with improper reporting as to whether voice is working.
This fixes #1436, an issue where the 'call button' sometimes got greyed
out when it shouldn't have been.

Vivox is now 'working' (and the call button can be enabled) when it's logged in.
WebRTC is 'working' (and the call button can be enabled) when the coroutine is active.
2024-09-11 15:58:56 -07:00
Roxie Linden 44e1be64e0 mute icons were not showing during group call when user was muted
This fixes: https://github.com/secondlife/viewer-private/issues/285

When processing messages from the voice server, the volume and not the
mute status was being checked with respect to retrieving the mute status.
2024-09-10 14:34:39 -07:00
Roxie Linden 5f99c475dc Voice bars of self and as seen by others do not appear the same.
The voice server sends up the float power level of peers as an integer
multiplied by 128, in order to save character count as the voice power level
will likely be only 3 digits, instead of many for a full float.

The client was not taking this into account.
2024-09-09 15:12:40 -07:00
Roxie Linden d9f0a587a8 Fix some race conditions on connection shutdown.
In a few locations, there were cases where connection shutdown
would stall, leaving the connection in place.  This was due to
bad handling of the outstanding operations counter.
2024-09-04 15:45:03 -07:00
Brad Linden c2402afd8b Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into release/2024.08-DeltaFPS
# Conflicts:
 #	indra/newview/featuretable_mac.txt
2024-08-22 11:15:11 -07:00
Roxie Linden 7560bd0be2 removed unnecessary comment 2024-08-20 17:14:00 -07:00
Roxie Linden 45ebc5867a Fix hang when incoming p2p or group calls throw up dialog.
There were changes in atlasaurus that resulted in a hang for incoming p2p
and group calls which throw up dialogs.  The changes revolved around mutex,
coroutines, job queues, and such.
The fix was to do any processing that may result in callbacks from
the webrtc code in a queued job instead of a coroutine.
2024-08-20 15:34:20 -07:00
Brad Linden 68f712615f Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into develop
# Conflicts:
 #	autobuild.xml
 #	indra/newview/llvoicewebrtc.cpp
2024-08-20 09:44:14 -07:00
Roxie Linden 1ff30757bc Log WebRTC devices on webrtc initialization. 2024-08-16 13:16:39 -07:00
Brad Linden 5f26ba8014 Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus
# Conflicts:
 #	indra/newview/llpanelpeople.cpp
2024-08-15 09:41:54 -07:00
Roxie Linden 661b6d12a0 Don't call virtual functions in a derived class constructor 2024-08-14 15:22:15 -07:00
Roxie Linden 8897ebeb6a Voice dot not always visible after crossing region boundaries.
For issue #2064
The connection to the voice server was not upgraded/downgraded to primary/secondary when crossing
region boundaries, so the server sent the wrong value and the viewer chose not to display a voice dot.
2024-08-14 14:42:59 -07:00
Andrey Kleshchev b36dacce33 viewer#2204 crash at connectionStateMachine 2024-08-14 19:30:55 +03:00
Andrey Kleshchev bf3e2e2b17 viewer-private#262 webrtc crashes on shutdown #2 2024-08-13 19:30:17 +03:00
Brad Linden c106221726 Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into develop
# Conflicts:
 #	.github/workflows/build.yaml
 #	indra/llui/llscrolllistctrl.cpp
2024-08-09 15:43:06 -07:00
Brad Linden 3b2c32fdf9 Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus
# Conflicts:
 #	.github/workflows/build.yaml
 #	indra/newview/CMakeLists.txt
 #	indra/newview/llspeakers.cpp
 #	indra/newview/llvoicechannel.cpp
 #	indra/newview/llvoicechannel.h
 #	indra/newview/llvoiceclient.cpp
 #	indra/newview/llvoiceclient.h
 #	indra/newview/llvoicewebrtc.cpp
2024-08-09 15:10:13 -07:00
Andrey Kleshchev f0db41911a viewer-private#262 viewer crashes on exit if the call is not completed 2024-08-07 14:19:49 +03:00
Andrey Kleshchev ae7f7cd670 Replace boost::shared_ptr with std in voice classes 2024-08-07 14:19:49 +03:00
Andrey Kleshchev b5c9a30e3d viewer#2203 Crash at breakVoiceConnectionCoro
bar webrtc's coroutines from necromancy
2024-08-07 07:48:19 +03:00
Brad Linden 0ff2bd1a40 Merge remote-tracking branch 'origin/release/2024.06-atlasaurus' into develop 2024-08-01 15:42:22 -07:00
Brad Linden 002be0f243 Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus 2024-08-01 15:40:41 -07:00
Roxie Linden b9c222dfae Implement a Logging Sink for WebRTC
WebRTC logs now pass out of the webrtc library into a logging sink,
which converts them into SecondLife.log compatable logging calls.

This includes fatal errors and asserts, which are now logged into
SecondLife.log, and should be available in the crash logger.
2024-07-31 21:23:30 -06:00
Andrey Kleshchev f75735d741 viewer-private#255 p2p outgoing calls did not work correctly #2 2024-07-30 07:31:05 +03:00
Rye Mutt c7c7342ed3 Update boost to 1.85 and fix deprecation warnings 2024-07-29 08:20:32 +03:00
Brad Linden 3e4b23539c Merge remote-tracking branch 'origin/release/webrtc-voice' into release/2024.06-atlasaurus
# Conflicts:
 #	autobuild.xml
 #	indra/newview/llvoicechannel.cpp
2024-07-17 14:35:17 -07:00
Rye Mutt 2a7030992f
Update tracy profiler to 0.10 (#1946) 2024-07-09 16:53:43 -05:00
Ansariel 9fdca96f8b Re-enable compiler warnings C4244 and C4396 except for lltracerecording.h and llunittype.h for now 2024-07-08 20:27:14 +02:00