• Post Reply Bookmark Topic Watch Topic
  • New Topic

JMF.....Help!!!!!!!!

 
Anand Ramaswamy
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Hello
I am trying to record audio from a mike and store it in a file.The prog complies properly,but the programme terminates abruptly,giving the error in the jmf.log file.
--------------------
## DataSource created: com.sun.media.protocol.javasound.DataSource@7eca64
XX Cannot open audio device for input: java.lang.IllegalStateException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
XX Cannot open audio device for input: java.lang.IllegalStateException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
XX java.io.IOException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
XX Cannot open audio device for input: java.lang.IllegalStateException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
XX Cannot open audio device for input: java.lang.IllegalStateException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
XX java.io.IOException: Line is already open with format PCM_SIGNED, 44100.0 Hz, 16 bit, stereo, little-endian, audio data and bufferSize 22048
---------------
this is the code i used
AudioFormat format=new AudioFormat(AudioFormat.LINEAR,44100,16,1);
Vector device=CaptureDeviceManager.getDeviceList(format);//getting the objects in an array i.e vectorsCaptureDeviceInfo di=null;
CaptureDeviceManager dm=null;CaptureDeviceManager.getDevice("LittleEndian");
if(device.size()>0)
{
di=(CaptureDeviceInfo)device.firstElement();
System.out.println(di.toString());
//dm.addDevice(di);// ......adding the device found
}
else
{
System.exit(-1);//exit........if no capturedevice was found
}

Can anybody tell me as to why i am getting this error
:-)
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!