<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>76397</bug_id>
          
          <creation_ts>2012-01-16 11:58:19 -0800</creation_ts>
          <short_desc>HRTFPanner not rendering correctly on mac port</short_desc>
          <delta_ts>2012-01-19 09:53:00 -0800</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Web Audio</component>
          <version>528+ (Nightly build)</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Chris Rogers">crogers</reporter>
          <assigned_to name="Jer Noble">jer.noble</assigned_to>
          <cc>crogers</cc>
    
    <cc>eric.carlson</cc>
    
    <cc>jer.noble</cc>
    
    <cc>pnormand</cc>
    
    <cc>webkit.review.bot</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>536694</commentid>
    <comment_count>0</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-01-16 11:58:19 -0800</bug_when>
    <thetext>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...</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536722</commentid>
    <comment_count>1</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-16 13:04:29 -0800</bug_when>
    <thetext>Is it possible the bug is in the way that Composite.wav was generated?  Should generating Composite.wav be a compile-time step?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536730</commentid>
    <comment_count>2</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-01-16 13:16:58 -0800</bug_when>
    <thetext>You may want to try a quick test to see if it&apos;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?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536740</commentid>
    <comment_count>3</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-16 13:45:07 -0800</bug_when>
    <thetext>I regenerated the composite file, and that appeared to take care of the erratic sound.  Here&apos;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 &quot;IRC_Composite_C_R0195_T%03d_P%03d.wav\n&quot; &quot;$(expr $azimuth \* 15)&quot; &quot;$elevation&quot;; \
    done; \
  done;) \
Composite.wav</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536741</commentid>
    <comment_count>4</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-16 13:46:05 -0800</bug_when>
    <thetext>So it appears the root of the problem is that the description of the Composite.wav file inside HRTFElevation.cpp doesn&apos;t match the generated Composite.wav.  This could be as easy a fix as committing a new Composite.wav.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536742</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-01-16 13:50:07 -0800</bug_when>
    <thetext>Sounds reasonable to me.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536744</commentid>
    <comment_count>6</comment_count>
      <attachid>122680</attachid>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-16 13:53:15 -0800</bug_when>
    <thetext>Created attachment 122680
Patch</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536747</commentid>
    <comment_count>7</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-16 13:55:49 -0800</bug_when>
    <thetext>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.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536830</commentid>
    <comment_count>8</comment_count>
      <attachid>122680</attachid>
    <who name="Eric Carlson">eric.carlson</who>
    <bug_when>2012-01-16 17:46:03 -0800</bug_when>
    <thetext>Comment on attachment 122680
Patch

rs=me</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>536915</commentid>
    <comment_count>9</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2012-01-17 00:11:20 -0800</bug_when>
    <thetext>Thanks for taking care of this issue! I indeed wrongly generated Composite.wav :(</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>538603</commentid>
    <comment_count>10</comment_count>
    <who name="Philippe Normand">pnormand</who>
    <bug_when>2012-01-19 03:51:56 -0800</bug_when>
    <thetext>Jer, do you plan to land this or can we use the cq?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>538742</commentid>
    <comment_count>11</comment_count>
    <who name="Jer Noble">jer.noble</who>
    <bug_when>2012-01-19 08:45:25 -0800</bug_when>
    <thetext>Sorry, yes, the cq is fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>538773</commentid>
    <comment_count>12</comment_count>
      <attachid>122680</attachid>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-19 09:52:53 -0800</bug_when>
    <thetext>Comment on attachment 122680
Patch

Clearing flags on attachment: 122680

Committed r105421: &lt;http://trac.webkit.org/changeset/105421&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>538774</commentid>
    <comment_count>13</comment_count>
    <who name="WebKit Review Bot">webkit.review.bot</who>
    <bug_when>2012-01-19 09:53:00 -0800</bug_when>
    <thetext>All reviewed patches have been landed.  Closing bug.</thetext>
  </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>122680</attachid>
            <date>2012-01-16 13:53:15 -0800</date>
            <delta_ts>2012-01-19 09:52:53 -0800</delta_ts>
            <desc>Patch</desc>
            <filename>bug-76397-20120116135314.patch</filename>
            <type>text/plain</type>
            <size>2990</size>
            <attacher name="Jer Noble">jer.noble</attacher>
            
              <data encoding="base64">U3VidmVyc2lvbiBSZXZpc2lvbjogMTA1MDc5CmRpZmYgLS1naXQgYS9Tb3VyY2UvV2ViQ29yZS9D
aGFuZ2VMb2cgYi9Tb3VyY2UvV2ViQ29yZS9DaGFuZ2VMb2cKaW5kZXggNGI4ODVmZDU3YTVkOGI5
M2E2MDM4OGI2NTAwNmViOGYwOTNkMzFmNC4uNWVlMDJkM2Y5MDc0NGJmODJlODgwYTA1ZTJjYjZi
ZmE2ZmU3NGY3YSAxMDA2NDQKLS0tIGEvU291cmNlL1dlYkNvcmUvQ2hhbmdlTG9nCisrKyBiL1Nv
dXJjZS9XZWJDb3JlL0NoYW5nZUxvZwpAQCAtMSw1ICsxLDE4IEBACiAyMDEyLTAxLTE2ICBKZXIg
Tm9ibGUgIDxqZXIubm9ibGVAYXBwbGUuY29tPgogCisgICAgICAgIEhSVEZQYW5uZXIgbm90IHJl
bmRlcmluZyBjb3JyZWN0bHkgb24gbWFjIHBvcnQKKyAgICAgICAgaHR0cHM6Ly9idWdzLnd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