topical media & game development

talk show tell print

mobile-query-three-docs-symbols-tQuery.WebAudio.Sound.htm / htm



  
  <!DOCTYPE html>
  <html lang="en">
          <head>
                  <meta charset="utf-8" />
                  <meta name="generator" content="JsDoc Toolkit" />
                  <title>tQuery.WebAudio.Sound | tQuery library</title>
  
                  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0" />
                  <meta name="mobileoptimized" content="0" />
          
                  <link rel="stylesheet" href="../css/all.css" media="all" />
                  <link rel="stylesheet" href="../css/handheld.css" media="only screen and (max-width: 660px)" />
                  <link rel="stylesheet" href="../css/handheld.css" media="handheld" />
                  <link rel="stylesheet" href="../css/screen.css" media="screen and (min-width: 661px)" />
  
                  <script src="../javascript/all.js"></script>
                  <!--[if lt IE 9]>
                          <script src="../javascript/html5.js"></script>
                  <![endif]-->
          </head>
  
          <body>
  
  <div class="index">
          <div class="menu">
                  <div class="indexLinks">
                          <a href="../index.html">Classes</a>
                          <a href="../files.html">Files</a>
                  </div>
          
                  <h2 class="heading1">Classes</h2>
                  
                  <input type="text" name="classFilter" class="classFilter" id="ClassFilter" placeholder="Filter"></input>
                  
                  <nav>
                          <ul class="classList" id="ClassList">
                                  
                                          <li><a href="../symbols/tQuery.html">tQuery</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Geometry.html">tQuery<span class='break'> </span>.<span class='break'> </span>Geometry</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Light.html">tQuery<span class='break'> </span>.<span class='break'> </span>Light</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Loop.html">tQuery<span class='break'> </span>.<span class='break'> </span>Loop</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Material.html">tQuery<span class='break'> </span>.<span class='break'> </span>Material</a></li>
                                  
                                          <li><a href="../symbols/tQuery.MD2Character.html">tQuery<span class='break'> </span>.<span class='break'> </span>MD2Character</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Mesh.html">tQuery<span class='break'> </span>.<span class='break'> </span>Mesh</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Node.html">tQuery<span class='break'> </span>.<span class='break'> </span>Node</a></li>
                                  
                                          <li><a href="../symbols/tQuery.Object3D.html">tQuery<span class='break'> </span>.<span class='break'> </span>Object3D</a></li>
                                  
                                          <li><a href="../symbols/tQuery.RatamahattaMD2Character.html">tQuery<span class='break'> </span>.<span class='break'> </span>RatamahattaMD2Character</a></li>
                                  
                                          <li><a href="../symbols/tQuery.WebAudio.html">tQuery<span class='break'> </span>.<span class='break'> </span>WebAudio</a></li>
                                  
                                          <li><a href="../symbols/tQuery.WebAudio.NodeChainBuilder.html">tQuery<span class='break'> </span>.<span class='break'> </span>WebAudio<span class='break'> </span>.<span class='break'> </span>NodeChainBuilder</a></li>
                                  
                                          <li><a href="../symbols/tQuery.WebAudio.Sound.html">tQuery<span class='break'> </span>.<span class='break'> </span>WebAudio<span class='break'> </span>.<span class='break'> </span>Sound</a></li>
                                  
                                          <li><a href="../symbols/tQuery.World.html">tQuery<span class='break'> </span>.<span class='break'> </span>World</a></li>
                                  
                          </ul>
                  </nav>
          </div>
          <div class="fineprint" style="clear:both">
                  <footer>
                          
                          Documentation generator: <a href="http://code.google.com/p/jsdoc-toolkit/" target="_blank">JsDoc Toolkit</a> 2.4.0<br />
                          Template: <a href="http://www.thebrightlines.com/2010/05/06/new-template-for-jsdoctoolkit-codeview/" target="_blank">Codeview</a> 1.2<br />
                          Generated on:
                          <time datetime='2012-3-23' pubdate>2012-3-23 13:20</time>
                  </footer>
          </div>
  </div>
  
  <div class="index indexStatic"></div>
  
  <div class="content">
          <div class="innerContent">
                  <article>
                          <header>
                                  <h1 class="classTitle">
                                          
                                          Class <span>tQuery.WebAudio.Sound</span>
                                  </h1>
                                  
                                  <div class="intro">
                                          <p class="description summary">
                                                  Handle one sound for tQuery.WebAudio
                                          </p>
                                                  
                                          
                                                  <ul class="summary">
                                                          
                                                          
                                                          
                                                                  <li>Defined in: <a href="../symbols/src/plugins_webaudio_tquery.webaudio.js.html">tquery.webaudio.js</a></li>
                                                          
                                                          
                                                  </ul>
                                          
                                  </div>
                          </header>
                          
                          
                                  <section>
                                          <div class="props">
                                                  <table class="summaryTable" cellspacing="0" summary="A summary of the constructor documented in the class tQuery.WebAudio.Sound.">
                                                          <caption class="sectionTitle">Class Summary</caption>
                                                          <thead>
                                                                  <tr>
                                                                          <th scope="col">Constructor Attributes</th>
                                                                          <th scope="col">Constructor Name and Description</th>
                                                                  </tr>
                                                          </thead>
                                                          <tbody>
                                                                  <tr>
                                                                          <td class="attributes">&nbsp;</td>
                                                                          <td class="nameDescription" >
                                                                                  <div class="fixedFont">
                                                                                          <b><a href="../symbols/tQuery.WebAudio.Sound.html#constructor">tQuery.WebAudio.Sound</a></b>(world, nodeChain)
                                                                                  </div>
                                                                                  <div class="description">sound instance</div>
                                                                          </td>
                                                                  </tr>
                                                          </tbody>
                                                  </table>
                                          </div>
                                  </section>
                          
                          
                          
          <!--
  
# METHODS SUMMARY --> <section> <div class="props"> <h2 class="sectionTitle">Method Summary</h2> <nav> <table class="summaryTable" id="MethodsList" cellspacing="0" summary="A summary of the methods documented in the class tQuery.WebAudio.Sound."> <thead> <tr> <th scope="col">Method Attributes</th> <th scope="col">Method Name and Description</th> </tr> </thead> <tbody> <tr class='item0' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#amplitude">amplitude</a></b>(width) </div> <div class="description">compute the amplitude of the sound (not sure at all it is the proper term)</div> </td> </tr> <tr class='item1' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#destroy">destroy</a></b>() </div> <div class="description">destructor</div> </td> </tr> <tr class='item2' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#follow">follow</a></b>(object3d) </div> <div class="description">follow a object3D</div> </td> </tr> <tr class='item3' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#isFollowing">isFollowing</a></b>() </div> <div class="description"></div> </td> </tr> <tr class='item4' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#isPlayable">isPlayable</a></b>() </div> <div class="description"></div> </td> </tr> <tr class='item5' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#load">load</a></b>(url, callback) </div> <div class="description">Load a sound</div> </td> </tr> <tr class='item6' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#loop">loop</a></b>(value) </div> <div class="description">getter/setter on the loop</div> </td> </tr> <tr class='item7' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#nodes">nodes</a></b>() </div> <div class="description">getter of the chain nodes</div> </td> </tr> <tr class='item8' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#pannerCone">pannerCone</a></b>(innerAngle, outerAngle, outerGain) </div> <div class="description">Set parameter for the pannerCone</div> </td> </tr> <tr class='item9' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#pannerConeInnerAngle">pannerConeInnerAngle</a></b>(value) </div> <div class="description">getter/setter on the pannerConeInnerAngle</div> </td> </tr> <tr class='item10' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#pannerConeOuterAngle">pannerConeOuterAngle</a></b>(value) </div> <div class="description">getter/setter on the pannerConeOuterAngle</div> </td> </tr> <tr class='item11' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#pannerConeOuterGain">pannerConeOuterGain</a></b>(value) </div> <div class="description">getter/setter on the pannerConeOuterGain</div> </td> </tr> <tr class='item12' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#play">play</a></b>(time) </div> <div class="description">play the sound</div> </td> </tr> <tr class='item13' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#unfollow">unfollow</a></b>() </div> <div class="description">unfollow the object3D if any</div> </td> </tr> <tr class='item14' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#updateWithMatrix4">updateWithMatrix4</a></b>(matrixWorld, deltaTime) </div> <div class="description">Update the source with a matrixWorld.</div> </td> </tr> <tr class='item15' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#updateWithObject3d">updateWithObject3d</a></b>(object3d, deltaTime) </div> <div class="description">Update the source with object3d.</div> </td> </tr> <tr class='item16' > <td class="attributes">&nbsp;</td> <td class="nameDescription"> <div class="fixedFont"><b><a href="../symbols/tQuery.WebAudio.Sound.html#volume">volume</a></b>(value) </div> <div class="description">getter/setter on the volume</div> </td> </tr> </tbody> </table> </nav> </div> </section> <!-- # EVENTS SUMMARY --> <!-- # CONSTRUCTOR DETAILS --> <section> <div class="details props"> <div class="innerProps"> <h2 class="sectionTitle" id="constructor"> Class Detail </h2> <div class="fixedFont"> <b>tQuery.WebAudio.Sound</b>(world, nodeChain) </div> <div class="description"> sound instance </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{<a href="../symbols/tQuery.World.html">tQuery.World</a>}</span> <b>world</b> <i>Optional</i> </dt> <dd>the world on which to run</dd> <dt> <span class="light fixedFont">{<a href="../symbols/tQuery.WebAudio.NodeChainBuilder.html">tQuery.WebAudio.NodeChainBuilder</a>}</span> <b>nodeChain</b> <i>Optional</i> </dt> <dd>the nodeChain to use</dd> </dl> </div> </div> </section> <!-- # FIELD DETAILS --> <!-- # METHOD DETAILS --> <section> <div class="details props"> <div class="innerProps"> <h2 class="sectionTitle"> Method Detail </h2> <ul class="methodDetail" id="MethodDetail"> <li class='item0' > <div class="fixedFont heading" id="amplitude"> <span class='lighter'> </span> <span class="light">{Number}</span> <b>amplitude</b>(width) </div> <div class="description"> compute the amplitude of the sound (not sure at all it is the proper term) </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>width</b> </dt> <dd>the number of frequencyBin to take into account</dd> </dl> <dl class="detailList nomargin"> <dt class="heading">Returns:</dt> <dd><span class="light fixedFont">{Number}</span> return the amplitude of the sound</dd> </dl> <div class="hr"></div> </li> <li class='item1' > <div class="fixedFont heading" id="destroy"> <span class='lighter'> </span> <b>destroy</b>() </div> <div class="description"> destructor </div> <div class="hr"></div> </li> <li class='item2' > <div class="fixedFont heading" id="follow"> <span class='lighter'> </span> <b>follow</b>(object3d) </div> <div class="description"> follow a object3D </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <b>object3d</b> </dt> <dd></dd> </dl> <div class="hr"></div> </li> <li class='item3' > <div class="fixedFont heading" id="isFollowing"> <span class='lighter'> </span> <span class="light">{Boolean}</span> <b>isFollowing</b>() </div> <div class="description"> </div> <dl class="detailList nomargin"> <dt class="heading">Returns:</dt> <dd><span class="light fixedFont">{Boolean}</span> true if this sound is following a object3d, false overwise</dd> </dl> <div class="hr"></div> </li> <li class='item4' > <div class="fixedFont heading" id="isPlayable"> <span class='lighter'> </span> <span class="light">{Boolean}</span> <b>isPlayable</b>() </div> <div class="description"> </div> <dl class="detailList nomargin"> <dt class="heading">Returns:</dt> <dd><span class="light fixedFont">{Boolean}</span> true if the sound is playable, false otherwise</dd> </dl> <div class="hr"></div> </li> <li class='item5' > <div class="fixedFont heading" id="load"> <span class='lighter'> </span> <b>load</b>(url, callback) </div> <div class="description"> Load a sound </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{String}</span> <b>url</b> </dt> <dd>the url of the sound to load</dd> <dt> <span class="light fixedFont">{Function}</span> <b>callback</b> </dt> <dd>function to notify once the url is loaded (optional)</dd> </dl> <div class="hr"></div> </li> <li class='item6' > <div class="fixedFont heading" id="loop"> <span class='lighter'> </span> <b>loop</b>(value) </div> <div class="description"> getter/setter on the loop </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>value</b> <i>Optional</i> </dt> <dd>the value to set, if not provided, get current value</dd> </dl> <div class="hr"></div> </li> <li class='item7' > <div class="fixedFont heading" id="nodes"> <span class='lighter'> </span> <b>nodes</b>() </div> <div class="description"> getter of the chain nodes </div> <div class="hr"></div> </li> <li class='item8' > <div class="fixedFont heading" id="pannerCone"> <span class='lighter'> </span> <b>pannerCone</b>(innerAngle, outerAngle, outerGain) </div> <div class="description"> Set parameter for the pannerCone </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>innerAngle</b> </dt> <dd>the inner cone hangle in radian</dd> <dt> <span class="light fixedFont">{Number}</span> <b>outerAngle</b> </dt> <dd>the outer cone hangle in radian</dd> <dt> <span class="light fixedFont">{Number}</span> <b>outerGain</b> </dt> <dd>the gain to apply when in the outerCone</dd> </dl> <div class="hr"></div> </li> <li class='item9' > <div class="fixedFont heading" id="pannerConeInnerAngle"> <span class='lighter'> </span> <b>pannerConeInnerAngle</b>(value) </div> <div class="description"> getter/setter on the pannerConeInnerAngle </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>value</b> </dt> <dd>the angle in radian</dd> </dl> <div class="hr"></div> </li> <li class='item10' > <div class="fixedFont heading" id="pannerConeOuterAngle"> <span class='lighter'> </span> <b>pannerConeOuterAngle</b>(value) </div> <div class="description"> getter/setter on the pannerConeOuterAngle </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>value</b> </dt> <dd>the angle in radian</dd> </dl> <div class="hr"></div> </li> <li class='item11' > <div class="fixedFont heading" id="pannerConeOuterGain"> <span class='lighter'> </span> <b>pannerConeOuterGain</b>(value) </div> <div class="description"> getter/setter on the pannerConeOuterGain </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>value</b> </dt> <dd>the value</dd> </dl> <div class="hr"></div> </li> <li class='item12' > <div class="fixedFont heading" id="play"> <span class='lighter'> </span> <b>play</b>(time) </div> <div class="description"> play the sound </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>time</b> <i>Optional</i> </dt> <dd>time when to play the sound</dd> </dl> <div class="hr"></div> </li> <li class='item13' > <div class="fixedFont heading" id="unfollow"> <span class='lighter'> </span> <b>unfollow</b>() </div> <div class="description"> unfollow the object3D if any </div> <div class="hr"></div> </li> <li class='item14' > <div class="fixedFont heading" id="updateWithMatrix4"> <span class='lighter'> </span> <b>updateWithMatrix4</b>(matrixWorld, deltaTime) </div> <div class="description"> Update the source with a matrixWorld. usefull for positional sounds </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{THREE.Matrix4}</span> <b>matrixWorld</b> </dt> <dd>the matrixWorld describing the position of the sound</dd> <dt> <span class="light fixedFont">{Number}</span> <b>deltaTime</b> </dt> <dd>the number of seconds since last update</dd> </dl> <div class="hr"></div> </li> <li class='item15' > <div class="fixedFont heading" id="updateWithObject3d"> <span class='lighter'> </span> <b>updateWithObject3d</b>(object3d, deltaTime) </div> <div class="description"> Update the source with object3d. usefull for positional sounds </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{THREE.Object3D}</span> <b>object3d</b> </dt> <dd>the object which originate the source</dd> <dt> <span class="light fixedFont">{Number}</span> <b>deltaTime</b> </dt> <dd>the number of seconds since last update</dd> </dl> <div class="hr"></div> </li> <li class='item16' > <div class="fixedFont heading" id="volume"> <span class='lighter'> </span> <b>volume</b>(value) </div> <div class="description"> getter/setter on the volume </div> <dl class="detailList params"> <dt class="heading">Parameters:</dt> <dt> <span class="light fixedFont">{Number}</span> <b>value</b> <i>Optional</i> </dt> <dd>the value to set, if not provided, get current value</dd> </dl> </li> </ul> </div> </div> </section> <!-- # EVENT DETAILS --> </article> </div> </div>

                  <script type="text/javascript">
                          wbos.CssTools.MediaQueryFallBack.LoadCss('../css/screen.css', '../css/handheld.css', 660)
                          codeview.classFilter.Init()
                  </script>
          </body>
  </html>
  
  


(C) Æliens 04/09/2009

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.