Bug 1426719 - Update cubeb from upstream to e1e8337. r?jesup
MozReview-Commit-ID: E0eHOl3zA0a
--- 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