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

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>17411</bug_id>
          
          <creation_ts>2012-06-05 12:40:01 +0000</creation_ts>
          <short_desc>(AudioPannerNodeUnits): AudioPannerNode units are underspecified</short_desc>
          <delta_ts>2014-10-28 17:16:46 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>AudioWG</product>
          <component>Web Audio API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>TBD</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Michael[tm] Smith">mike</reporter>
          <assigned_to name="This bug has no owner yet - up for the taking">dave.null</assigned_to>
          <cc>crogers</cc>
    
    <cc>mage</cc>
    
    <cc>public-audio</cc>
          
          <qa_contact name="This bug has no owner yet - up for the taking">dave.null</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>68723</commentid>
    <comment_count>0</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2012-06-05 12:40:01 +0000</bug_when>
    <thetext>Audio-ISSUE-62 (AudioPannerNodeUnits): AudioPannerNode units are underspecified [Web Audio API]

http://www.w3.org/2011/audio/track/issues/62

Raised by: Marcus Geelnard
On product: Web Audio API

https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioPannerNode

What are the units of the set* vectors? AudioListener.speedOfSound has the unit m/s. If that is correct (?), the set* vectors should use meters and meters / second too.

Suggestion: Don&apos;t use meters (not in AudioPannerNode, and not in AudioListener), to allow for custom unit systems.

Also, the units of coneInnerAngle, coneOuterAngle and coneOuterGain are undefined.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>78316</commentid>
    <comment_count>1</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-11-14 20:18:22 +0000</bug_when>
    <thetext>Similar to OpenAL, the units used in the coordinate system are not defined, and do not need to be.

Quoting from the OpenAL spec:
http://connect.creativelabs.com/openal/Documentation/OpenAL%201.1%20Specification.pdf

3.3. Space and Distance
OpenAL does not define the units of measurement for distances. The application is free to
use its own units, for example, meters, inches, or parsecs. OpenAL provides means for
simulating the natural attenuation of sound according to distance, and to exaggerate or
reduce this effect. However, the resulting effects do not depend on the distance unit used
by the application to express source and listener coordinates. OpenAL calculations are
scale invariant.

Fixed:
https://dvcs.w3.org/hg/audio/rev/b21b04a1ec0e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79264</commentid>
    <comment_count>2</comment_count>
    <who name="Marcus Geelnard (Opera)">mage</who>
    <bug_when>2012-12-03 09:32:51 +0000</bug_when>
    <thetext>One more thing: Section 4.15. The AudioListener Interface reads &quot;// in meters / second (default 343.3)&quot; for the speedOfSound attribute, which is obviously wrong, then.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79332</commentid>
    <comment_count>3</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-12-03 23:23:18 +0000</bug_when>
    <thetext>(In reply to comment #2)
&gt; One more thing: Section 4.15. The AudioListener Interface reads &quot;// in
&gt; meters / second (default 343.3)&quot; for the speedOfSound attribute, which is
&gt; obviously wrong, then.

Sorry Marcus, I wasn&apos;t clear about that part.  The doppler effect uses the .speedOfSound attribute in conjunction with the velocity vectors for both the AudioPannerNode and the AudioListener.  These velocity vectors are in meters/second and are independent of the units used for position and orientation.  This is taken directly from the OpenAL specification.

Added more specific text for the setVelocity() methods and also added the doppler shift algorithm which uses these values.

Fixed:
https://dvcs.w3.org/hg/audio/rev/f4bef40f3efe</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79390</commentid>
    <comment_count>4</comment_count>
    <who name="Marcus Geelnard (Opera)">mage</who>
    <bug_when>2012-12-04 10:26:01 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Sorry Marcus, I wasn&apos;t clear about that part.  The doppler effect uses the
&gt; .speedOfSound attribute in conjunction with the velocity vectors for both
&gt; the AudioPannerNode and the AudioListener.  These velocity vectors are in
&gt; meters/second and are independent of the units used for position and
&gt; orientation.  This is taken directly from the OpenAL specification.

I still don&apos;t understand why we need to have a unit at all (I see nothing in the algorithm that depends on actual units). Could it not be unit-less, and work just as it is? It would be confusing (IMO) to force the usage of m/s for some vectors, and then let people use whatever they want (e.g. inches or miles) for other vectors.

I&apos;d personally prefer an all-or-nothing solution: either all vectors are in m and m/s, or they are all in [custom] and [custom]/s, or possibly even [custom_length] and [custom_length]/[custom_time] (like miles/h).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79422</commentid>
    <comment_count>5</comment_count>
    <who name="Chris Rogers">crogers</who>
    <bug_when>2012-12-04 18:34:46 +0000</bug_when>
    <thetext>(In reply to comment #4)
&gt; (In reply to comment #3)
&gt; &gt; Sorry Marcus, I wasn&apos;t clear about that part.  The doppler effect uses the
&gt; &gt; .speedOfSound attribute in conjunction with the velocity vectors for both
&gt; &gt; the AudioPannerNode and the AudioListener.  These velocity vectors are in
&gt; &gt; meters/second and are independent of the units used for position and
&gt; &gt; orientation.  This is taken directly from the OpenAL specification.
&gt; 
&gt; I still don&apos;t understand why we need to have a unit at all (I see nothing in
&gt; the algorithm that depends on actual units). Could it not be unit-less, and
&gt; work just as it is? It would be confusing (IMO) to force the usage of m/s
&gt; for some vectors, and then let people use whatever they want (e.g. inches or
&gt; miles) for other vectors.
&gt; 
&gt; I&apos;d personally prefer an all-or-nothing solution: either all vectors are in
&gt; m and m/s, or they are all in [custom] and [custom]/s, or possibly even
&gt; [custom_length] and [custom_length]/[custom_time] (like miles/h).

I&apos;m just taking this interpretation from the OpenAL specification.  But you&apos;re right, we could just say that .speedOfSound is the speed in arbitrary units which are also used by the velocity vectors.  These units are independent of the units used for position and orientation vectors.

How does that sound?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>79462</commentid>
    <comment_count>6</comment_count>
    <who name="Marcus Geelnard (Opera)">mage</who>
    <bug_when>2012-12-05 08:29:31 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; I&apos;m just taking this interpretation from the OpenAL specification.  But
&gt; you&apos;re right, we could just say that .speedOfSound is the speed in arbitrary
&gt; units which are also used by the velocity vectors.  These units are
&gt; independent of the units used for position and orientation vectors.
&gt; 
&gt; How does that sound?

That sounds like the better choice, yes. I&apos;m sure there are some reasons why OpenAL uses m/s, but unless we know why and it&apos;s a strong enough reason, I don&apos;t think that it&apos;s enough for us to just duplicate that part.

PS. One guess as to why OpenAL want to use m/s it so that the default speed of sound = 343.3 makes sense. On the other hand, this is kind of similar to the gravity property in the Bullet physics library, which defaults to a unit-less 10 (all things are unit-less in Bullet).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>113874</commentid>
    <comment_count>7</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:13:51 +0000</bug_when>
    <thetext>Web Audio API issues have been migrated to Github. 
See https://github.com/WebAudio/web-audio-api/issues</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114020</commentid>
    <comment_count>8</comment_count>
    <who name="Olivier Thereaux">olivier.thereaux</who>
    <bug_when>2014-10-28 17:16:46 +0000</bug_when>
    <thetext>Closing. See https://github.com/WebAudio/web-audio-api/issues for up to date list of issues for the Web Audio API.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>