From: Jesús P. R. <jes...@qu...> - 2012-07-09 09:18:53
|
Hi, I´m new developing with media stuff and FMJ but everything I need seems to be ok (play, sent RTP audio, etc.). I only have problems capturing audio devices, I have check with the code included at the end (taken from SimpleVoiceTransmiter) and with some another changes but I just can´t get it :(. ¿Could anybody help me please? NOTE: I´m using Eclipse and I jmf.jar was added to references libraries. // First find a capture device that will capture linear audio // data at 8bit 8Khz AudioFormat captureFormat = new AudioFormat(AudioFormat.LINEAR, 8000, 8, 1); Vector devices = CaptureDeviceManager.getDeviceList(captureFormat); // Vector<CaptureDeviceInfo> devices = CaptureDeviceManager.getDeviceList(null); // CaptureDeviceInfo captureDeviceInfo = CaptureDeviceManager.getDevice("JavaSound"); if (!devices.isEmpty()) { captureDeviceInfo = (CaptureDeviceInfo) devices.elementAt(0); } else { System.err.println("No capture devices"); // exit if we could not find the relevant capturedevice. System.exit(-1); } -- Jesús Pérez VoIP Engineer at Quobis Fixed: +34 902 999 465 Site: http://www.quobis.com |