Bug 1426719 - Update cubeb from upstream to e1e8337. r?jesup draft
authorAlex Chronopoulos <achronop@gmail.com>
Thu, 21 Dec 2017 21:25:40 +0200
changeset 714132 9403b151fbec6bda82074c869e33be8cc9a85601
parent 714124 0843e4e6cb1d6e32a35ce4d7014bd250c24f74fa
child 744533 40db3db4807827e2760c067e89afaa9c0b91eda5
push id93861
push userachronop@gmail.com
push dateThu, 21 Dec 2017 19:27:02 +0000
reviewersjesup
bugs1426719
milestone59.0a1
Bug 1426719 - Update cubeb from upstream to e1e8337. r?jesup MozReview-Commit-ID: E0eHOl3zA0a
media/libcubeb/README_MOZILLA
media/libcubeb/src/cubeb_wasapi.cpp
--- a/media/libcubeb/README_MOZILLA
+++ b/media/libcubeb/README_MOZILLA
@@ -1,8 +1,8 @@
 The source from this directory was copied from the cubeb 
 git repository using the update.sh script.  The only changes
 made were those applied by update.sh and the addition of
 Makefile.in build files for the Mozilla build system.
 
 The cubeb git repository is: git://github.com/kinetiknz/cubeb.git
 
-The git commit ID used was a88bf027a27038feedca386efe5801350832dd91 (2017-12-07 16:23:55 +0200)
+The git commit ID used was e1e8337c43d2c99ba88e9b7fc2da82238c8fb4b4 (2017-12-21 21:11:57 +0200)
--- a/media/libcubeb/src/cubeb_wasapi.cpp
+++ b/media/libcubeb/src/cubeb_wasapi.cpp
@@ -1137,33 +1137,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