Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b4cc5118 authored by Nivedita Sarkar's avatar Nivedita Sarkar Committed by Steve Kondik
Browse files

ToneGenerator.h: Add C++11 workaround for static const float member initialization

C++11 does not permit the initialization of static const float types.
Use a preprocessor macro as a workaround until the entire system can
be upgraded to C++11.

Change-Id: I959e0bcc972ea9a24451ae1e405e7a43066b760a
parent 42da2fdd
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -211,7 +211,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().
    #define TONEGEN_GAIN 0.9  // Default gain passed to  WaveGenerator().

    // ToneDescriptor class contains all parameters needed to generate a tone:
    //    - The array waveFreq[]: