summaryrefslogtreecommitdiffstats
path: root/services/audioflinger/AudioResamplerFirGen.h
diff options
context:
space:
mode:
Diffstat (limited to 'services/audioflinger/AudioResamplerFirGen.h')
-rw-r--r--services/audioflinger/AudioResamplerFirGen.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/services/audioflinger/AudioResamplerFirGen.h b/services/audioflinger/AudioResamplerFirGen.h
index d024b2f..f3718b6 100644
--- a/services/audioflinger/AudioResamplerFirGen.h
+++ b/services/audioflinger/AudioResamplerFirGen.h
@@ -17,6 +17,8 @@
#ifndef ANDROID_AUDIO_RESAMPLER_FIR_GEN_H
#define ANDROID_AUDIO_RESAMPLER_FIR_GEN_H
+#include "utils/Compat.h"
+
namespace android {
/*
@@ -187,22 +189,22 @@ static inline int64_t toint(double x, int64_t maxval) {
template <int N>
struct I0Term {
- static const double value = I0Term<N-1>::value / (4. * N * N);
+ static const CONSTEXPR double value = I0Term<N-1>::value / (4. * N * N);
};
template <>
struct I0Term<0> {
- static const double value = 1.;
+ static const CONSTEXPR double value = 1.;
};
template <int N>
struct I0ATerm {
- static const double value = I0ATerm<N-1>::value * (2.*N-1.) * (2.*N-1.) / (8. * N);
+ static const CONSTEXPR double value = I0ATerm<N-1>::value * (2.*N-1.) * (2.*N-1.) / (8. * N);
};
template <>
struct I0ATerm<0> { // 1/sqrt(2*PI);
- static const double value = 0.398942280401432677939946059934381868475858631164934657665925;
+ static const CONSTEXPR double value = 0.398942280401432677939946059934381868475858631164934657665925;
};
#if USE_HORNERS_METHOD