import org.openkinect.Freenect;
import org.openkinect.Device;
import org.openkinect.AudioCallback;
class Audio implements AudioCallback
{
public void audio_capture(int[] mic1, int[] mic2, int[] mic3, int[] mic4, short[] c)
{
System.out.println(mic1.length);
}
}
public class FreenectAudio
{
public static void main(String[] args) {
Freenect kinect = new Freenect();
try {
Device dev = kinect.open(0);
dev.setLED(Device.LED_GREEN);
dev.setAudioCallback(new Audio());
dev.startAudio();
try {
Thread.sleep(5000);
} catch(Exception e) {
}
} finally {
kinect.shutdown();
}
}
}