Bug 1448627 - Update cubeb to 7712aaab.
MozReview-Commit-ID: HbYayQvtQQc
--- 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 77cb1a9a37bb9fcc43743770727cb6a31b27ab74 (2018-03-23 14:38:34 +1000)
+The git commit ID used was 7712aaabfa140e8c7fe890e3f5f65dfe3fe58632 (2018-03-25 11:30:38 +0200)
--- a/media/libcubeb/src/cubeb_mixer.cpp
+++ b/media/libcubeb/src/cubeb_mixer.cpp
@@ -9,19 +9,16 @@
#define NOMINMAX
#include <algorithm>
#include <cassert>
#include <climits>
#include <cmath>
#include <cstdlib>
-#ifdef _MSC_VER
-#include <intrin.h>
-#endif
#include <memory>
#include <type_traits>
#include "cubeb-internal.h"
#include "cubeb_mixer.h"
#include "cubeb_utils.h"
#ifndef FF_ARRAY_ELEMS
#define FF_ARRAY_ELEMS(a) (sizeof(a) / sizeof((a)[0]))
@@ -75,26 +72,25 @@ cubeb_channel_layout_check(cubeb_channel
}
return l;
}
unsigned int cubeb_channel_layout_nb_channels(cubeb_channel_layout x)
{
#if __GNUC__ || __clang__
return __builtin_popcount (x);
-#elif _MSC_VER
- return __popcnt(x);
#else
x -= (x >> 1) & 0x55555555;
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
x = (x + (x >> 4)) & 0x0F0F0F0F;
x += x >> 8;
return (x + (x >> 16)) & 0x3F;
#endif
}
+
struct MixerContext {
MixerContext(cubeb_sample_format f,
uint32_t in_channels,
cubeb_channel_layout in,
uint32_t out_channels,
cubeb_channel_layout out)
: _format(f)
, _in_ch_layout(cubeb_channel_layout_check(in, in_channels))