summaryrefslogtreecommitdiffstats
path: root/include/media
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2014-11-20 11:31:17 -0800
committerDan Albert <danalbert@google.com>2014-11-20 11:34:32 -0800
commit36802bd18b7b4e8c87fa019c7e3068bee330d174 (patch)
treea5c4847a10d5f77a04b9a621174a774d84cb7c31 /include/media
parentde14fae779240a99c53d58ef16ce3086321ff897 (diff)
downloadframeworks_av-36802bd18b7b4e8c87fa019c7e3068bee330d174.zip
frameworks_av-36802bd18b7b4e8c87fa019c7e3068bee330d174.tar.gz
frameworks_av-36802bd18b7b4e8c87fa019c7e3068bee330d174.tar.bz2
C++11 compatibility.
* Fix string literal concatenation to not be interpreted as UD literals. * Add constexpr compatibility for non-integral static members. * Use __typeof__ instead of typeof (should become decltype once this actually becomes C++11). * Add an appropriate cast for atomic_uintptr_t, since moving to C++11 means moving from <stdatomic.h> to <atomic>, which has better typechecking (hooray for not macros!). Bug: 18466763 Change-Id: I9561dcb2526578687819ff85421ba80d8e1a9694
Diffstat (limited to 'include/media')
-rw-r--r--include/media/ToneGenerator.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/media/ToneGenerator.h b/include/media/ToneGenerator.h
index 98c4332..8406ed6 100644
--- a/include/media/ToneGenerator.h
+++ b/include/media/ToneGenerator.h
@@ -17,11 +17,12 @@
#ifndef ANDROID_TONEGENERATOR_H_
#define ANDROID_TONEGENERATOR_H_
-#include <utils/RefBase.h>
-#include <utils/KeyedVector.h>
-#include <utils/threads.h>
#include <media/AudioSystem.h>
#include <media/AudioTrack.h>
+#include <utils/Compat.h>
+#include <utils/KeyedVector.h>
+#include <utils/RefBase.h>
+#include <utils/threads.h>
namespace android {
@@ -207,7 +208,7 @@ private:
static const unsigned int TONEGEN_MAX_WAVES = 3; // Maximun number of sine waves in a tone segment
static const unsigned int TONEGEN_MAX_SEGMENTS = 12; // Maximun number of segments in a tone descriptor
static const unsigned int TONEGEN_INF = 0xFFFFFFFF; // Represents infinite time duration
- static const float TONEGEN_GAIN = 0.9; // Default gain passed to WaveGenerator().
+ static const CONSTEXPR float TONEGEN_GAIN = 0.9; // Default gain passed to WaveGenerator().
// ToneDescriptor class contains all parameters needed to generate a tone:
// - The array waveFreq[]: