summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-08-24 21:17:22 +0200
committerBernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>2012-08-24 21:17:22 +0200
commitdf77cb6a6498dd491d84336bd2332353d356b581 (patch)
tree4004a6ae6e0168893542db7e975d5b45647e1bae
parentff2a11542a08ea9c849b5077fa7c6fb8dbfc945c (diff)
av: Fix build in ISO C++11 modelinaro_android_4.1.1
Change-Id: I461d8ce5b24afedee245a6441b600df286c76b63 Signed-off-by: Bernhard Rosenkraenzer <Bernhard.Rosenkranzer@linaro.org>
-rw-r--r--services/audioflinger/AudioResampler.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/services/audioflinger/AudioResampler.h b/services/audioflinger/AudioResampler.h
index 1610e003..3020bf98 100644
--- a/services/audioflinger/AudioResampler.h
+++ b/services/audioflinger/AudioResampler.h
@@ -22,6 +22,10 @@
#include "AudioBufferProvider.h"
+#if __cplusplus < 201103L && !defined(__GXX_EXPERIMENTAL_CXX0X__) && !defined(constexpr)
+#define constexpr const
+#endif
+
namespace android {
// ----------------------------------------------------------------------------
@@ -62,13 +66,13 @@ public:
protected:
// number of bits for phase fraction - 30 bits allows nearly 2x downsampling
- static const int kNumPhaseBits = 30;
+ static constexpr int kNumPhaseBits = 30;
// phase mask for fraction
- static const uint32_t kPhaseMask = (1LU<<kNumPhaseBits)-1;
+ static constexpr uint32_t kPhaseMask = (1LU<<kNumPhaseBits)-1;
// multiplier to calculate fixed point phase increment
- static const double kPhaseMultiplier = 1L << kNumPhaseBits;
+ static constexpr double kPhaseMultiplier = 1L << kNumPhaseBits;
AudioResampler(int bitDepth, int inChannelCount, int32_t sampleRate);