Changeset 73294 in webkit


Ignore:
Timestamp:
Dec 3, 2010 1:38:16 PM (13 years ago)
Author:
crogers@google.com
Message:

2010-12-03 Chris Rogers <crogers@google.com>

Unreviewed build fix.

Fix M_E compile error on Chromium Win
https://bugs.webkit.org/show_bug.cgi?id=50479

  • platform/audio/AudioUtilities.cpp: (WebCore::AudioUtilities::discreteTimeConstantForSampleRate):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r73293 r73294  
     12010-12-03  Chris Rogers  <crogers@google.com>
     2
     3        Unreviewed build fix.
     4
     5        Fix M_E compile error on Chromium Win
     6        https://bugs.webkit.org/show_bug.cgi?id=50479
     7
     8        * platform/audio/AudioUtilities.cpp:
     9        (WebCore::AudioUtilities::discreteTimeConstantForSampleRate):
     10
    1112010-12-03  Chris Rogers  <crogers@google.com>
    212
  • trunk/WebCore/platform/audio/AudioUtilities.cpp

    r69083 r73294  
    2525#include "config.h"
    2626
     27#if ENABLE(WEB_AUDIO)
     28
    2729#include "AudioUtilities.h"
    28 
    29 #include <math.h>
     30#include <wtf/MathExtras.h>
    3031
    3132namespace WebCore {
     
    5152double discreteTimeConstantForSampleRate(double timeConstant, double sampleRate)
    5253{
    53     return 1.0 - pow(1.0 / M_E, 1.0 / (sampleRate * timeConstant));
     54    // hardcoded value is temporary build fix for Windows.
     55    // FIXME: replace hardcode 2.718282 with M_E until the correct MathExtras.h solution is determined.
     56    return 1.0 - pow(1.0 / 2.718282, 1.0 / (sampleRate * timeConstant));
    5457}
    5558   
     
    5760
    5861} // WebCore
     62
     63#endif // ENABLE(WEB_AUDIO)
Note: See TracChangeset for help on using the changeset viewer.