How to get the currently playing audio as audio input in Processing?
<p>I am creating a simple audio visualizer. Here is the code</p>

<pre><code>import ddf.minim.analysis.*;
import ddf.minim.*;

Minim minim;
AudioInput in;
FFT fft;

int w;

PImage fade;

void setup() {
  size(640,480); // draw screen
  minim = new Minim(this); // new minim object

  in = minim.getLineIn(Minim.STEREO,512); // audio input from microphone (have to change this to get currently playing audio)

  fft = new FFT(in.bufferSize(),in.sampleRate()); // new fft object

  fft.logAverages(60,7);

  stroke(255); 
  w=width/fft.avgSize();
  strokeWeight(w); // display lines as bars

  background(0);

}

void draw() {
  background(0);
  fft.forward(in.mix); //generate fourier series

  for(int i = 0; i &lt; fft.avgSize(); i++) {
    line((i*w)+(w/2),height, (i*w)+(w/2), height - fft.getAvg(i)*4); // draw bars
  }
}
</code></pre>

<p>Here <code>in = minim.getLineIn(Minim.STEREO,512);</code>  gives the audio input from the from the microphone. But I need to get currently playing audio <em>(What you hear from the speaker or headphone)</em> of the computer and visualize it.</p>

<p>If there is any method or any other way to get currently playing audio as the input please mention. Thanks in advance :)</p>