Bug 1426719 - Pick cubeb e1e8337 to beta. r=jesup a=jcristau DEVEDITION_58_0b13_RELEASE FIREFOX_58_0b13_BUILD1 FIREFOX_58_0b13_RELEASE
authorAlex Chronopoulos <achronop@gmail.com>
Tue, 26 Dec 2017 09:48:25 +0100
changeset 443026 cb9a0bfe28ea476c6299d7684dab4b6f2a0b4e0f
parent 443025 de57ad2b9bc57fa27ba986b07ca64b1323633524
child 443027 b2ffd80d6ac9c45616600455daef7bf6a8c07d09
push id8437
push userjcristau@mozilla.com
push dateTue, 26 Dec 2017 08:51:05 +0000
treeherdermozilla-beta@cb9a0bfe28ea [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjesup, jcristau
bugs1426719
milestone58.0
Bug 1426719 - Pick cubeb e1e8337 to beta. r=jesup a=jcristau
media/libcubeb/pick-cubeb-e1e8337-to-beta.patch
media/libcubeb/src/cubeb_wasapi.cpp
media/libcubeb/update.sh
new file mode 100644
--- /dev/null
+++ b/media/libcubeb/pick-cubeb-e1e8337-to-beta.patch
@@ -0,0 +1,39 @@
+diff --git a/media/libcubeb/src/cubeb_wasapi.cpp b/media/libcubeb/src/cubeb_wasapi.cpp
+--- a/media/libcubeb/src/cubeb_wasapi.cpp
++++ b/media/libcubeb/src/cubeb_wasapi.cpp
+@@ -1120,33 +1120,33 @@ stream_set_volume(cubeb_stream * stm, fl
+   stm->stream_reset_lock.assert_current_thread_owns();
+ 
+   if (!stm->audio_stream_volume) {
+     return CUBEB_ERROR;
+   }
+ 
+   uint32_t channels;
+   HRESULT hr = stm->audio_stream_volume->GetChannelCount(&channels);
+-  if (hr != S_OK) {
++  if (FAILED(hr)) {
+     LOG("could not get the channel count: %lx", hr);
+     return CUBEB_ERROR;
+   }
+ 
+   /* up to 9.1 for now */
+   if (channels > 10) {
+     return CUBEB_ERROR_NOT_SUPPORTED;
+   }
+ 
+   float volumes[10];
+   for (uint32_t i = 0; i < channels; i++) {
+     volumes[i] = volume;
+   }
+ 
+   hr = stm->audio_stream_volume->SetAllVolumes(channels,  volumes);
+-  if (hr != S_OK) {
++  if (FAILED(hr)) {
+     LOG("could not set the channels volume: %lx", hr);
+     return CUBEB_ERROR;
+   }
+ 
+   return CUBEB_OK;
+ }
+ } // namespace anonymous
+ 
--- a/media/libcubeb/src/cubeb_wasapi.cpp
+++ b/media/libcubeb/src/cubeb_wasapi.cpp
@@ -1120,33 +1120,33 @@ stream_set_volume(cubeb_stream * stm, fl
   stm->stream_reset_lock.assert_current_thread_owns();
 
   if (!stm->audio_stream_volume) {
     return CUBEB_ERROR;
   }
 
   uint32_t channels;
   HRESULT hr = stm->audio_stream_volume->GetChannelCount(&channels);
-  if (hr != S_OK) {
+  if (FAILED(hr)) {
     LOG("could not get the channel count: %lx", hr);
     return CUBEB_ERROR;
   }
 
   /* up to 9.1 for now */
   if (channels > 10) {
     return CUBEB_ERROR_NOT_SUPPORTED;
   }
 
   float volumes[10];
   for (uint32_t i = 0; i < channels; i++) {
     volumes[i] = volume;
   }
 
   hr = stm->audio_stream_volume->SetAllVolumes(channels,  volumes);
-  if (hr != S_OK) {
+  if (FAILED(hr)) {
     LOG("could not set the channels volume: %lx", hr);
     return CUBEB_ERROR;
   }
 
   return CUBEB_OK;
 }
 } // namespace anonymous
 
--- a/media/libcubeb/update.sh
+++ b/media/libcubeb/update.sh
@@ -69,8 +69,11 @@ else
   echo "Remember to update README_MOZILLA with the version details."
 fi
 
 echo "Applying disable-assert.patch on top of $rev"
 patch -p3 < disable-assert.patch
 
 echo "Applying prefer-pulse-rust.patch on top of $rev"
 patch -p3 < prefer-pulse-rust.patch
+
+echo "Applying pick-cubeb-e1e8337-to-beta.patch on top of $rev"
+patch -p3 < pick-cubeb-e1e8337-to-beta.patch