Bug 1654744 - Reset the output buffer when the round latency is measured. r=padenot
authorAlex Chronopoulos <achronop@gmail.com>
Thu, 23 Jul 2020 09:22:57 +0000
changeset 541740 df5996370d1d281c6ce6695958d1f15f76fa83b9
parent 541739 45e8dd195f714ebf8f858a9d6a17d80f3b306e13
child 541741 29ae67e7f8d53a56c4460565b9326d87a7f5a7a7
push id37631
push userbtara@mozilla.com
push dateThu, 23 Jul 2020 16:21:22 +0000
treeherdermozilla-central@38eb7e998859 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspadenot
bugs1654744
milestone80.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 1654744 - Reset the output buffer when the round latency is measured. r=padenot Differential Revision: https://phabricator.services.mozilla.com/D84661
dom/media/CubebUtils.cpp
--- a/dom/media/CubebUtils.cpp
+++ b/dom/media/CubebUtils.cpp
@@ -695,17 +695,18 @@ cubeb_stream_prefs GetDefaultStreamPrefs
     return CUBEB_STREAM_PREF_DISABLE_DEVICE_SWITCHING;
   }
 #endif
   return CUBEB_STREAM_PREF_NONE;
 }
 
 bool RouteOutputAsVoice() { return sRouteOutputAsVoice; }
 
-long datacb(cubeb_stream*, void*, const void*, void*, long nframes) {
+long datacb(cubeb_stream*, void*, const void*, void* out_buffer, long nframes) {
+  PodZero(static_cast<float*>(out_buffer), nframes * 2);
   return nframes;
 }
 
 void statecb(cubeb_stream*, void*, cubeb_state) {}
 
 bool EstimatedRoundTripLatencyDefaultDevices(double* aMean, double* aStdDev) {
   nsTArray<double> roundtripLatencies;
   // Create a cubeb stream with the correct latency and default input/output