title: Web Audio API Analyser Node Not Working With Microphone Input
body: <p>The bug preventing getting microphone input per <a href="http://code.google.com/p/chromium/issues/detail?id=112367">http://code.google.com/p/chromium/issues/detail?id=112367</a> for Chrome Canary is now fixed. This part does seem to be working. I can assign the mic input to an audio element and hear the results through the speaker.</p>
  
  <p>But I'd like to connect an analyser node in order to do FFT. The analyser node works fine if I set the audio source to a local file. The problem is that when connected to the mic audio stream, the analyser node just returns the base value as if it doesn't have an audio stream at all. (It's -100 over and over again if you're curious.)</p>
  
  <p>Anyone know what's up? Is it not implemented yet? Is this a chrome bug? I'm running 26.0.1377.0 on Windows 7 and have the getUserMedia flag enabled and am serving through localhost via python's simpleHTTPServer so it can request permissions.</p>
  
  <p>Code:</p>
  
  <pre><code>var aCtx = new webkitAudioContext();
  var analyser = aCtx.createAnalyser();
  if (navigator.getUserMedia) {
    navigator.getUserMedia({audio: true}, function(stream) {
      // audio.src = "stupid.wav"
      audio.src = window.URL.createObjectURL(stream);
    }, onFailure);
  }
  $('#audio').on("loadeddata",function(){
      source = aCtx.createMediaElementSource(audio);
      source.connect(analyser);
      analyser.connect(aCtx.destination);
      process();
  });
  </code></pre>
  
  <p>Again, if I set audio.src to the commented version, it works, but with microphone it is not. Process contains:</p>
  
  <pre><code>FFTData = new Float32Array(analyser.frequencyBinCount);
  analyser.getFloatFrequencyData(FFTData);
  console.log(FFTData[0]);
  </code></pre>
  
  <p>I've also tried using the createMediaStreamSource and bypassing the audio element - example 4 - <a href="https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html">https://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/webrtc-integration.html</a>. Also unsuccessful. :(</p>
  
  <pre><code>    if (navigator.getUserMedia) {
          navigator.getUserMedia({audio: true}, function(stream) {
          var microphone = context.createMediaStreamSource(stream);
          microphone.connect(analyser);
          analyser.connect(aCtx.destination);
          process();
      }
  </code></pre>
  
  <p>I imagine it might be possible to write the mediasteam to a buffer and then use dsp.js or something to do fft, but I wanted to check first before I go down that road.</p>