Title: [123175] trunk/Source
Revision
123175
Author
[email protected]
Date
2012-07-19 21:27:18 -0700 (Thu, 19 Jul 2012)

Log Message

enable Web Audio for chromium android port
https://bugs.webkit.org/show_bug.cgi?id=89428

Patch by Wei James <[email protected]> on 2012-07-19
Reviewed by Kenneth Russell.

Source/WebCore:

* WebCore.gyp/WebCore.gyp:
* platform/audio/FFTFrameStub.cpp:
(WebCore::FFTFrame::doFFT):

Source/WebKit/chromium:

* features.gypi:

Source/WTF:

* wtf/MathExtras.h:
(log2):
(log2f):

Modified Paths

Diff

Modified: trunk/Source/WTF/ChangeLog (123174 => 123175)


--- trunk/Source/WTF/ChangeLog	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WTF/ChangeLog	2012-07-20 04:27:18 UTC (rev 123175)
@@ -1,3 +1,14 @@
+2012-07-19  Wei James  <[email protected]>
+
+        enable Web Audio for chromium android port
+        https://bugs.webkit.org/show_bug.cgi?id=89428
+
+        Reviewed by Kenneth Russell.
+
+        * wtf/MathExtras.h:
+        (log2):
+        (log2f):
+
 2012-07-19  Scott Graham  <[email protected]>
 
         [Chromium] disable warning on Windows from gcc-only pragma in Assertions.cpp"

Modified: trunk/Source/WTF/wtf/MathExtras.h (123174 => 123175)


--- trunk/Source/WTF/wtf/MathExtras.h	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WTF/wtf/MathExtras.h	2012-07-20 04:27:18 UTC (rev 123175)
@@ -138,6 +138,21 @@
 inline long long abs(long num) { return labs(num); }
 #endif
 
+#if OS(ANDROID) || COMPILER(MSVC)
+// ANDROID and MSVC's math.h does not currently supply log2 or log2f.
+inline double log2(double num)
+{
+    // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
+    return log(num) / 0.693147180559945309417232121458176568;
+}
+
+inline float log2f(float num)
+{
+    // This constant is roughly M_LN2, which is not provided by default on Windows and Android.
+    return logf(num) / 0.693147180559945309417232121458176568f;
+}
+#endif
+
 #if COMPILER(MSVC)
 // The 64bit version of abs() is already defined in stdlib.h which comes with VC10
 #if COMPILER(MSVC9_OR_LOWER)
@@ -154,19 +169,6 @@
 inline double copysign(double x, double y) { return _copysign(x, y); }
 inline int isfinite(double x) { return _finite(x); }
 
-// MSVC's math.h does not currently supply log2 or log2f.
-inline double log2(double num)
-{
-    // This constant is roughly M_LN2, which is not provided by default on Windows.
-    return log(num) / 0.693147180559945309417232121458176568;
-}
-
-inline float log2f(float num)
-{
-    // This constant is roughly M_LN2, which is not provided by default on Windows.
-    return logf(num) / 0.693147180559945309417232121458176568f;
-}
-
 // Work around a bug in Win, where atan2(+-infinity, +-infinity) yields NaN instead of specific values.
 inline double wtf_atan2(double x, double y)
 {

Modified: trunk/Source/WebCore/ChangeLog (123174 => 123175)


--- trunk/Source/WebCore/ChangeLog	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WebCore/ChangeLog	2012-07-20 04:27:18 UTC (rev 123175)
@@ -1,3 +1,14 @@
+2012-07-19  Wei James  <[email protected]>
+
+        enable Web Audio for chromium android port
+        https://bugs.webkit.org/show_bug.cgi?id=89428
+
+        Reviewed by Kenneth Russell.
+
+        * WebCore.gyp/WebCore.gyp:
+        * platform/audio/FFTFrameStub.cpp:
+        (WebCore::FFTFrame::doFFT):
+
 2012-07-19  David Hyatt  <[email protected]>
 
         SVG images broken when max-width specified.

Modified: trunk/Source/WebCore/WebCore.gyp/WebCore.gyp (123174 => 123175)


--- trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WebCore/WebCore.gyp/WebCore.gyp	2012-07-20 04:27:18 UTC (rev 123175)
@@ -1441,7 +1441,7 @@
             ],
           },
         }],
-        ['OS != "android" and "WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
+        ['"WTF_USE_WEBAUDIO_FFMPEG=1" in feature_defines', {
           # This directory needs to be on the include path for multiple sub-targets of webcore.
           'direct_dependent_settings': {
             'include_dirs': [

Modified: trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp (123174 => 123175)


--- trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WebCore/platform/audio/FFTFrameStub.cpp	2012-07-20 04:27:18 UTC (rev 123175)
@@ -69,7 +69,7 @@
     ASSERT_NOT_REACHED();
 }
 
-void FFTFrame::doFFT(float* data)
+void FFTFrame::doFFT(const float* data)
 {
     ASSERT_NOT_REACHED();
 }

Modified: trunk/Source/WebKit/chromium/ChangeLog (123174 => 123175)


--- trunk/Source/WebKit/chromium/ChangeLog	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WebKit/chromium/ChangeLog	2012-07-20 04:27:18 UTC (rev 123175)
@@ -1,3 +1,12 @@
+2012-07-19  Wei James  <[email protected]>
+
+        enable Web Audio for chromium android port
+        https://bugs.webkit.org/show_bug.cgi?id=89428
+
+        Reviewed by Kenneth Russell.
+
+        * features.gypi:
+
 2012-07-19  Adam Barth  <[email protected]>
 
         [Chromium] Support external autofill popups

Modified: trunk/Source/WebKit/chromium/features.gypi (123174 => 123175)


--- trunk/Source/WebKit/chromium/features.gypi	2012-07-20 04:27:13 UTC (rev 123174)
+++ trunk/Source/WebKit/chromium/features.gypi	2012-07-20 04:27:18 UTC (rev 123175)
@@ -189,7 +189,7 @@
         ],
       }],
       # Mac OS X uses Accelerate.framework FFT by default instead of FFmpeg.
-      ['OS!="mac"', {
+      ['OS!="mac" and OS!="android"', {
         'feature_defines': [
           'WTF_USE_WEBAUDIO_FFMPEG=1',
         ],
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to