Bug 69292 - WEB_AUDIO does not compile on Leopard 32-bit.
Summary: WEB_AUDIO does not compile on Leopard 32-bit.
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Audio (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Chris Rogers
URL: http://build.webkit.org/builders/Leop...
Keywords:
Depends on:
Blocks: 68587
  Show dependency treegraph
 
Reported: 2011-10-03 14:31 PDT by Jer Noble
Modified: 2011-10-05 13:52 PDT (History)
4 users (show)

See Also:


Attachments
Patch (54.32 KB, patch)
2011-10-04 14:40 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (52.07 KB, patch)
2011-10-04 14:43 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (124.86 KB, patch)
2011-10-05 10:02 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (126.34 KB, patch)
2011-10-05 11:01 PDT, Jer Noble
no flags Details | Formatted Diff | Diff
Patch (130.09 KB, patch)
2011-10-05 12:45 PDT, Jer Noble
simon.fraser: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jer Noble 2011-10-03 14:31:09 PDT
WEB_AUDIO fails to compile on the Leopard bots due to many 32<->64 casting warnings.

http://build.webkit.org/builders/Leopard%20Intel%20Debug%20%28Build%29/builds/40113/steps/compile-webkit/logs/warnings%20%28178%29
Comment 1 Jer Noble 2011-10-04 14:40:30 PDT
Created attachment 109695 [details]
Patch
Comment 2 Jer Noble 2011-10-04 14:43:17 PDT
Created attachment 109696 [details]
Patch

This time, without the changes to project.pbxproj and SVGResourcePattern.cpp
Comment 3 Chris Rogers 2011-10-04 15:13:18 PDT
+kbr

Thanks Jer, I'm looking through it now.  I'm also applying the patch and measuring any performance difference in the DynamicsCompressor.  I don't expect to see too much difference but I just want to do a quick sanity check.
Comment 4 Chris Rogers 2011-10-04 16:22:05 PDT
I've run a few performance tests and it seems like I'm seeing some performance impact due to switching everything to double precision in ZeroPole.cpp and DynamicsCompressorKernel.cpp.  It worries me a bit, so I think it's probably a better idea to uniformly switch both of these over to using "float" everywhere in these places.  Sorry, I know I suggested you go the double route, but after having tested the performance...

As far as the DoublePoint3D - it probably is fine either way (using double as in your patch or switching everything to float).  Performance will not be an issue here.  I would go with DoublePoint3D if you think it will be useful to have this used in other parts of WebCore.
Comment 5 Jer Noble 2011-10-05 10:02:11 PDT
Created attachment 109814 [details]
Patch

Made the changes Chris Rogers suggested, namely operating as much as possible as floats.
Comment 6 WebKit Review Bot 2011-10-05 10:05:13 PDT
Attachment 109814 [details] did not pass style-queue:

Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebCore/ChangeLog', u'Source/WebCor..." exit_code: 1

Source/WebCore/platform/audio/Panner.h:50:  The parameter name "model" adds no information, so it should be removed.  [readability/parameter_name] [5]
Source/WebCore/platform/audio/HRTFKernel.h:80:  The parameter name "channel" adds no information, so it should be removed.  [readability/parameter_name] [5]
Total errors found: 2 in 89 files


If any of these errors are false positives, please file a bug against check-webkit-style.
Comment 7 WebKit Review Bot 2011-10-05 10:36:33 PDT
Comment on attachment 109814 [details]
Patch

Attachment 109814 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/9958324
Comment 8 Jer Noble 2011-10-05 11:01:45 PDT
Created attachment 109823 [details]
Patch
Comment 9 WebKit Review Bot 2011-10-05 11:40:25 PDT
Comment on attachment 109823 [details]
Patch

Attachment 109823 [details] did not pass chromium-ews (chromium-xvfb):
Output: http://queues.webkit.org/results/9942782
Comment 10 Chris Rogers 2011-10-05 11:49:48 PDT
patch seems pretty good so far -- I noticed it fails the cr-linux bots since some small changes are necessary to AudioDestinationChromium.cpp (due to sampleRate changing to float).
Could you please change AudioDestinationChromium?


In file included from /Volumes/Channel/Source/ChromiumTrunk/src/third_party/WebKit/Source/WebKit/chromium/src/AudioDestinationChromium.cpp:33:
src/AudioDestinationChromium.h:52:12: error: virtual function 'sampleRate' has a different return type ('double') than the function it overrides (which has return type 'float')
    double sampleRate() const { return m_sampleRate; }
           ^
../../WebCore/platform/audio/AudioDestination.h:53:19: note: overridden virtual function is here
    virtual float sampleRate() const = 0;
                  ^
/Volumes/Channel/Source/ChromiumTrunk/src/third_party/WebKit/Source/WebKit/chromium/src/AudioDestinationChromium.cpp:53:48: error: out-of-line definition of 'create' does not match any declaration in 'WebCore::AudioDestination'
PassOwnPtr<AudioDestination> AudioDestination::create(AudioSourceProvider& provider, double sampleRate)
                                               ^~~~~~
/Volumes/Channel/Source/ChromiumTrunk/src/third_party/WebKit/Source/WebKit/chromium/src/AudioDestinationChromium.cpp:104:26: error: out-of-line definition of 'WebCore::AudioDestination::hardwareSampleRate' differs from the declaration in the return type
double AudioDestination::hardwareSampleRate()
                         ^
../../WebCore/platform/audio/AudioDestination.h:54:18: note: previous declaration is here
    static float hardwareSampleRate();
                 ^
3 errors generated.
Comment 11 Jer Noble 2011-10-05 12:45:44 PDT
Created attachment 109839 [details]
Patch
Comment 12 Chris Rogers 2011-10-05 13:13:32 PDT
This looks fine to me.  There's one layout test "webaudio/audiobuffersource-playbackrate.html" which I'll need to rebaseline after this (I'll do it).  The test is audibly identical, but differs in the fringes due to the precision changes introduced in this patch.

All audio samples run fine - performance is fine
Comment 13 Chris Rogers 2011-10-05 13:19:32 PDT
By the way, can you tell me how I can set my Xcode project to see these types of Leopard 32-bit warnings? I'd rather not bother you guys too much as code is modified and new code added...
Comment 14 Jer Noble 2011-10-05 13:30:17 PDT
(In reply to comment #13)
> By the way, can you tell me how I can set my Xcode project to see these types of Leopard 32-bit warnings? I'd rather not bother you guys too much as code is modified and new code added...

You need to set the compiler to GCC and build 32-bit.  In Xcode 4, select the WebCore project, and choose the WebCore Build Settings panel.  The option to choose the compiler is in Build Options / Compiler for C / C++ / Objective-C, and LLVM GCC 4.2 should be an option.
Comment 15 Simon Fraser (smfr) 2011-10-05 13:38:37 PDT
Comment on attachment 109839 [details]
Patch

rs=me
Comment 16 Jer Noble 2011-10-05 13:52:53 PDT
Committed r96745: <http://trac.webkit.org/changeset/96745>