title: HTML 5 Audio - AnalyserNode.getByteFrequencyData() Returns Undefined
body: <p>This appears to be a common question - <a href="https://stackoverflow.com/questions/16600639/javascript-web-audio-api-analysernode-not-working">Javascript Web Audio API AnalyserNode Not Working</a> - But I can't be sure if I've found an edge case with my implementation.</p>
  
  <p>I create an audio source using createMediaElementSource(), but instead of using an audio tag from the page markup, the element is created dynamically using Buzz.js.</p>
  
  <p>Here's my test setup:</p>
  
  <pre><code>window.addEventListener('load', function(e) {
      audioContext = new webkitAudioContext();
      audioAnalyser = audioContext.createAnalyser();
  
      sound = new buzz.sound("sound.mp3");
      sound.load().bind("canplaythrough", function(e) {
          source = audioContext.createMediaElementSource(this.sound);
          source.connect(audioAnalyser);
  
          audioAnalyser.connect(audioContext.destination);
  
          this.play().loop(); 
      });
  }, false);
  
  window.setInterval(function(){
      array = new Uint8Array(audioAnalyser.frequencyBinCount);
      console.log(audioAnalyser.getByteFrequencyData(array));                                           
  })    
  </code></pre>
  
  <p>With the code above, the sound plays. I can also attach others nodes (biquad filters, gain etc) which work, but the audioAnalyser.getByteFrequencyData returns undefined values on every frame...</p>
  
  <p>Might it have anything to do with using Buzz.js?</p>