RESOLVED FIXED Bug 76397
HRTFPanner not rendering correctly on mac port
https://bugs.webkit.org/show_bug.cgi?id=76397
Summary HRTFPanner not rendering correctly on mac port
Chris Rogers
Reported 2012-01-16 11:58:19 PST
Steps to reproduce 1. Visit http://chromium.googlecode.com/svn/trunk/samples/audio/simple.html 2. Move the red dot around the center. The panning is no longer smooth, but jumps around erratically. I believe this was likely caused by: http://trac.webkit.org/changeset/104859 It sounds like the azimuth and elevation are reversed, but it may be a different problem. This may also be an issue on the GTK port where this code has also been used for awhile. Unfortunately, we currently have no layout test for HRTFPanner...
Attachments
Patch (2.92 KB, patch)
2012-01-16 13:53 PST, Jer Noble
no flags
Jer Noble
Comment 1 2012-01-16 13:04:29 PST
Is it possible the bug is in the way that Composite.wav was generated? Should generating Composite.wav be a compile-time step?
Chris Rogers
Comment 2 2012-01-16 13:16:58 PST
You may want to try a quick test to see if it's simply that the ordering of the azimuth and elevations are reversed. In HRTFElevation.cpp check out: // The concatenated impulse response is a bus containing all // the elevations per azimuth, for all azimuths by increasing // order. So for a given azimuth and elevation we need to compute // the index of the wanted audio frames in the concatenated table. unsigned index = ((azimuth / AzimuthSpacing) * HRTFDatabase::NumberOfRawElevations) + elevationIndex; If you try reversing the roles of azimuth and elevation, it *might* fix the problem - worth checking Philippe?
Jer Noble
Comment 3 2012-01-16 13:45:07 PST
I regenerated the composite file, and that appeared to take care of the erratic sound. Here's the command I used: sox $( \ for azimuth in {0..23}; do \ for elevation in 315 330 345 0 15 30 45 60 75 90; do \ printf "IRC_Composite_C_R0195_T%03d_P%03d.wav\n" "$(expr $azimuth \* 15)" "$elevation"; \ done; \ done;) \ Composite.wav
Jer Noble
Comment 4 2012-01-16 13:46:05 PST
So it appears the root of the problem is that the description of the Composite.wav file inside HRTFElevation.cpp doesn't match the generated Composite.wav. This could be as easy a fix as committing a new Composite.wav.
Chris Rogers
Comment 5 2012-01-16 13:50:07 PST
Sounds reasonable to me.
Jer Noble
Comment 6 2012-01-16 13:53:15 PST
Jer Noble
Comment 7 2012-01-16 13:55:49 PST
You can check the Composite.wav file by downloading it and placing it in the appropriate location. (At least on the mac, this means in WebCore.framework/Resources/audio/Composite.wav. Other ports may add this file as a resource during compile time.)
Eric Carlson
Comment 8 2012-01-16 17:46:03 PST
Comment on attachment 122680 [details] Patch rs=me
Philippe Normand
Comment 9 2012-01-17 00:11:20 PST
Thanks for taking care of this issue! I indeed wrongly generated Composite.wav :(
Philippe Normand
Comment 10 2012-01-19 03:51:56 PST
Jer, do you plan to land this or can we use the cq?
Jer Noble
Comment 11 2012-01-19 08:45:25 PST
Sorry, yes, the cq is fine.
WebKit Review Bot
Comment 12 2012-01-19 09:52:53 PST
Comment on attachment 122680 [details] Patch Clearing flags on attachment: 122680 Committed r105421: <http://trac.webkit.org/changeset/105421>
WebKit Review Bot
Comment 13 2012-01-19 09:53:00 PST
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.