title: How to play a sound continuously without break?
body: <p>I am trying to play a vehicle driven sound in a browser based game (continuously without break).
  <br>My .wav file length is 1 second and has same frequency from beginning to end. But sound takes a little break before next iteration. 
  <br>Here is code:</p>
  
  <pre><code>function playSound()
  {
      //alert("");
      myAudio = new Audio('http://ithmbwp.com/feedback/SoundsTest/sounds/tank_driven.wav'); 
      if (typeof myAudio.loop == 'boolean')
      {
          myAudio.loop = true;
      }
      else
      {
          myAudio.addEventListener('ended', function() {
              this.currentTime = 0;
              this.play();
          }, false);
      }
      myAudio.volume = 0.3;
      myAudio.play();
  }
  </code></pre>
  
  <p>Can anyone help me to play the sound continuously?
  <br><h3>Edition</h3>
  You can visit my page <a href="http://ithmbwp.com/feedback/SoundsTest/" rel="noreferrer">here</a> to observe the problem.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>window.onload = function() {
    playSound();
  };
  
  function playSound()
  {
   //alert("");
   myAudio = new Audio('http://ithmbwp.com/feedback/SoundsTest/sounds/tank_driven.wav'); 
   if (typeof myAudio.loop == 'boolean')
   {
    myAudio.loop = true;
   }
   else
   {
    myAudio.addEventListener('ended', function() {
     this.currentTime = 0;
     this.play();
    }, false);
   }
   myAudio.volume = 0.3;
   myAudio.play();
  }</code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;h3 style="font-family:verdana;"&gt;Please listen the sound break.&lt;/h3&gt;
  &lt;h3 style="font-family:verdana;"&gt;It should be continuous.&lt;/h3&gt;</code></pre>
  </div>
  </div>
  </p>