Ignore:
Timestamp:
Dec 7, 2010, 1:45:04 PM (14 years ago)
Author:
[email protected]
Message:

2010-12-07 Kenneth Russell <[email protected]>

Reviewed by David Levin.

Fix compilation of core web audio files on Windows
https://bugs.webkit.org/show_bug.cgi?id=50603

Added log2 definition to MathExtras.h on Windows platform.

  • wtf/MathExtras.h: (log2):

2010-12-07 Kenneth Russell <[email protected]>

Reviewed by David Levin.

Fix compilation of core web audio files on Windows
https://bugs.webkit.org/show_bug.cgi?id=50603

Changed a few constructs using C99 features of math.h to use
wtf/MathExtras.h instead. Changed inline definitions of a couple of
const static doubles in classes to out-of-line. Built Chrome with
web audio enabled on Windows and Mac OS X to test these changes.

No new tests since audio API is not yet implemented.

  • WebCore.gypi:
  • platform/audio/AudioResampler.cpp:
  • platform/audio/Biquad.cpp: (WebCore::Biquad::setLowpassParams): (WebCore::Biquad::setHighpassParams): (WebCore::Biquad::setLowShelfParams):
  • platform/audio/Cone.cpp: (WebCore::ConeEffect::gain):
  • platform/audio/EqualPowerPanner.cpp: (WebCore::EqualPowerPanner::pan):
  • platform/audio/FFTFrame.cpp: (WebCore::FFTFrame::interpolateFrequencyComponents): (WebCore::FFTFrame::extractAverageGroupDelay): (WebCore::FFTFrame::addConstantGroupDelay):
  • platform/audio/HRTFKernel.cpp:
  • platform/audio/HRTFPanner.cpp:
  • webaudio/AudioBufferSourceNode.cpp: (WebCore::AudioBufferSourceNode::readFromBufferWithGrainEnvelope):
  • webaudio/AudioPannerNode.cpp: (WebCore::AudioPannerNode::getAzimuthElevation):
  • webaudio/AudioParam.cpp: Added. (AudioParam::setValue): (AudioParam::smooth):
  • webaudio/AudioParam.h:
  • webaudio/RealtimeAnalyser.cpp:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/wtf/MathExtras.h

    r63721 r73458  
    146146inline int isfinite(double x) { return _finite(x); }
    147147
     148// MSVC's math.h does not currently supply log2.
     149inline bool log2(double num)
     150{
     151    // This constant is roughly M_LN2, which is not provided by default on Windows.
     152    return log(num) / 0.693147180559945309417232121458176568;
     153}
     154
    148155// Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
    149156inline double wtf_atan2(double x, double y)
Note: See TracChangeset for help on using the changeset viewer.