// Read the next chunk of data from the TargetDataLine.
numBytesRead = line.read(data, 0, data.length);
// Save this chunk of data.
// out.write(data, 0, numBytesRead);
try {
g.removeAllPoints();
int i = new AudioInputStream(line).read(data);
ExtensionGUI.Input = data;
for (int j = 0; j < numBytesRead; j++)
if (j % 100 == 0)
g.addPoint(j/(float)i, data[j]);