title: Processing fft crash
body: <p>Weird thing. I keep getting processing or <em>java</em> to crash with this code which is based on a sample code from the processing website.</p>
  
  <p>On <em>pc</em> it doesn't work at all, on one <em>mac</em> it works for 5 seconds until it crushes and on another <em>mac</em> it just crust and gives me this:</p>
  
  <p><code>libc++abi.dylib: terminating with uncaught exception of type std::runtime_error: RtApiCore::probeDeviceOpen: the device (2) does not support the requested channel count.
  Could not run the sketch (Target VM failed to initialize).</code></p>
  
  <p>Do you think it's a problem with the library or with the code?
  If it's a problem with the library, could you recommend the best sound library to do something like this?</p>
  
  <p>Thank you :)</p>
  
  <pre><code>import processing.sound.*;
  
  FFT fft;
  AudioIn in;
  int bands = 512;
  float[] spectrum = new float[bands];
  
  void setup() {
    size(900, 600);
  
    background(255);
  
    // Create an Input stream which is routed into the Amplitude analyzer
    fft = new FFT(this, bands);
    in = new AudioIn(this, 0);
  
    // start the Audio Input
    in.start();
  
    // patch the AudioIn
    fft.input(in);
  }      
  
  void draw() { 
    background(255);
    int midPointW = width/2;
    int midPointH = height/2;
    float angle = 1;
    fft.analyze(spectrum);
    //float radius = 200;
  
    for(int i = 0; i &lt; bands; i++){
      // create the actions for placing points on a circle
      float radius = spectrum[i]*height*10;
      //float radius = 10;
      float endX = midPointW+sin(angle) * radius*10;
      float endY = midPointH+cos(angle) * radius*10;
      float startX = midPointW+sin(angle) * radius*5;
      float startY =  midPointH+cos(angle) * radius*5;
    // The result of the FFT is normalized
    // draw the line for frequency band i scaling it up by 5 to get more amplitude.
      line( startX, startY, endX, endY);
      angle = angle + angle;
      println(endX, "" ,endY);
   // if(angle &gt; 360){
   //     angle = 0;
   //   }
    }       
  }
  </code></pre>