Package

Source Code of Audio

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();
    }
  }
}

TOP

Related Classes of Audio

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.