secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
203 stars 51 forks source link

[WebRTC] Mic Volume slider does not affect transmitted audio loudness in WebRTC mode #1828

Open maestrolinden opened 1 month ago

maestrolinden commented 1 month ago

Environment

Second Life Release 7.1.9.9604591078 (64bit) Release Notes

You are at 128.0, 128.0, 23.0 in webRTC1 located at simhost-07c23d76c83837d55.aditi SLURL: secondlife://Aditi/secondlife/webRTC1/128/128/23 (global coordinates 259968.0, 245376.0, 23.0) WebRTC-Voice 2024-06-12.9490472357 Release Notes

CPU: Apple M1 Pro (2400 MHz) Memory: 16384 MB OS Version: Mac OS X 14.5.0 Darwin 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:12:58 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T6000 x86_64 Graphics Card Vendor: Apple Graphics Card: Apple M1 Pro

OpenGL Version: 4.1 Metal - 88.1

Window size: 1261x820 Font Size Adjustment: 96pt UI Scaling: 0.75 Draw distance: 96m Bandwidth: 10000kbit/s LOD factor: 1.125 Render quality: 1 Texture memory: 10922MB Disk cache: Max size 1638.4 MB (25.8% used) HiDPI display mode: 0

J2C Decoder Version: KDU v7.10.4 Audio Driver Version: FMOD Studio 2.02.13 Dullahan: 1.14.0.202310131309 CEF: 118.4.1+g3dd6078+chromium-118.0.5993.54 Chromium: 118.0.5993.54 LibVLC Version: 3.0.16 Voice Server Version: Secondlife WebRTC Gateway

Packets Lost: 0/574 (0.0%) June 21 2024 11:02:52

Description

When the 'Mic Volume' setting is adjusted in the webRTC viewer and applied, the viewer shows an updated speaking loudness in the viewer, but the actual loudness heard by other agents is unaffected. This issue only reproduces in webRTC mode; if on a Vivox region, the 'Mic Volume' adjustment has the full effect.

My overall impression is that mic volume filter is not applied to UserA's transmitted stream.

This issue is reproduced with both Mac and Windows viewers.

While the new "Automatic Gain Control" setting (enabled by default) might affect perceived loudness, disabling that feature has no effect on this issue. Even if AGC was normalizing very loud sources, I believe one would still hear some clipping distortion at loud volumes.

Reproduction steps

  1. Login to the same webRTC voice location with 2 viewers
  2. Place the 2 avatars near each other
  3. UserA: Open Preferences -> Sound & Media -> Voice Input & Output Devices, and set the "Mic Volume" slider to 0%
  4. UserA: speak into your microphone and note levels indicated in the loudness meter to the right of the slider
  5. UserA: click "OK" to apply the new setting
  6. UserA: Wait a few seconds for the viewer to reconnect to nearby chat, and begin to speak
    • UserA: Note how many lines are shown in your voice indicator (which may be 0)
    • UserB: Note how many lines are shown in UserB's voice indicator, and the loudness of UserA's voice
  7. UserA: Open Preferences -> Sound & Media -> Voice Input & Output Devices, and set the "Mic Volume" slider to 100%
  8. Repeat steps (4-6), comparing the effects of 100% volume to what was observed at 0% volume

Expected results:

Actual results:

igorlproductengine commented 3 weeks ago

Passed QA. Verified on the Second Life Release 7.1.9.9688089989 (64bit) build in the scope of https://github.com/secondlife/iqa/issues/270 on Win10/OSX systems.

Aditi grid: WebRTC region: WebRTC1. Simulator: WebRTC-Voice 2024-06-24.9652733849 Voice Server Version: Secondlife WebRTC Gateway.