Bug 1628779 - Add an entry in about:support for the roundtrip audio latency of default devices r=chunmin,fluent-reviewers,flod
authorPaul Adenot <paul@paul.cx>
Thu, 28 May 2020 09:52:25 +0000
changeset 532725 5e0b79c5f7e1e8274a632fbbedcef32ff42cdda1
parent 532724 eb232dca19b05733a3103e1689acad7c028ef063
child 532726 cc82aacadf8040bc92ab2fd97ec8b6d03bac1eb7
push id37457
push usernerli@mozilla.com
push dateThu, 28 May 2020 15:51:15 +0000
treeherdermozilla-central@272e3c98d002 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerschunmin, fluent-reviewers, flod
bugs1628779
milestone78.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1628779 - Add an entry in about:support for the roundtrip audio latency of default devices r=chunmin,fluent-reviewers,flod Differential Revision: https://phabricator.services.mozilla.com/D75334
toolkit/content/aboutSupport.js
toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -914,16 +914,29 @@ var snapshotFormatters = {
         });
       }
     }
 
     // Basic information
     insertBasicInfo("audio-backend", data.currentAudioBackend);
     insertBasicInfo("max-audio-channels", data.currentMaxAudioChannels);
     insertBasicInfo("sample-rate", data.currentPreferredSampleRate);
+    insertBasicInfo("roundtrip-latency", "...");
+    window.windowUtils
+      .defaultDevicesRoundTripLatency()
+      .then(latency => {
+        var latencyString = `${(latency[0] * 1000).toFixed(2)}ms (${(
+          latency[1] * 1000
+        ).toFixed(2)})`;
+        data.defaultDevicesRoundTripLatency = latencyString;
+        document.querySelector(
+          'th[data-l10n-id="roundtrip-latency"]'
+        ).nextSibling.textContent = latencyString;
+      })
+      .catch(e => {});
 
     // Output devices information
     insertDeviceInfo("output", data.audioOutputDevices);
 
     // Input devices information
     insertDeviceInfo("input", data.audioInputDevices);
 
     // Media Capabilitites
--- a/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
+++ b/toolkit/locales/en-US/toolkit/about/aboutSupport.ftl
@@ -119,16 +119,17 @@ sandbox-sys-call-args = Arguments
 safe-mode-title = Try Safe Mode
 restart-in-safe-mode-label = Restart with Add-ons Disabled…
 
 ## Media titles
 
 audio-backend = Audio Backend
 max-audio-channels = Max Channels
 sample-rate = Preferred Sample Rate
+roundtrip-latency = Roundtrip latency (standard deviation)
 media-title = Media
 media-output-devices-title = Output Devices
 media-input-devices-title = Input Devices
 media-device-name = Name
 media-device-group = Group
 media-device-vendor = Vendor
 media-device-state = State
 media-device-preferred = Preferred