title: HTML5 Game - Works in IE, Chrome. Fails in FireFox...Until I Navigate to a .mp3 File...Then It Works
body: <p>I'm using a game library (<a href="http://html5quintus.com/" rel="nofollow">http://html5quintus.com/</a>) to try and make a very simple 2d platformer.  I don't think this is necessarily specific to game development though.  I'm really just trying to play some audio files.</p>
  
  <p>I'm using FireFox 31.0 - (the latest AFAIK).</p>
  
  <p>The audio files I'm dealing with are all .mp3 files.  The line of code that seems to be causing the problem is:</p>
  
  <pre><code>  Q.audioContext.decodeAudioData(request.response, function(buffer) {
      callback(key,buffer);
    }, errorCallback);
  </code></pre>
  
  <p>The error I get is: </p>
  
  <blockquote>
    <p>The buffer passed to decodeAudioData contains invalid content which
    cannot be decoded successfully. localhost : 50796 uncaught exception:
    Error Loading: jump.mp3</p>
  </blockquote>
  
  <p>What I find most confusing though, is that if I navigate to the audio file directly (/audio/jump.mp3) - FireFox will play that audio file correctly.</p>
  
  <p>Here's where it gets really weird....AFTER I load any one of the .mp3 files.  If I navigate back to my game and reload it - it suddenly works completely.  All of the sounds/background music work and everything is just like it is in IE and Chrome.  But if I don't manually load a .mp3 file first, it doesn't.</p>
  
  <p>Once the game is working, I can close that tab/open a new tab and visit the URL and it works again.  It seems to continue working fine until I exit FireFox completely.  Then, the game won't work until I first revisit the .mp3 file directly.</p>
  
  <p>Can anyone tell me what I've done wrong here?</p>