Menu

No line matching interface TargetDataLine

Help
Anonymous
2011-03-18
2012-12-06
  • Anonymous

    Anonymous - 2011-03-18

    Hello,

    Could tell me why this exception?

    Exception in thread "Thread-19" java.lang.IllegalArgumentException: No line matching interface TargetDataLine supporting format PCM_SIGNED 8000.0 Hz, 16 bit, mono, 2 bytes/frame, little-endian is supported.

            at javax.sound.sampled.AudioSystem.getLine(AudioSystem.java:459)
            at net.sourceforge.peers.media.SoundManager.openAndStartLines(SoundManager.java:89)
            at net.sourceforge.peers.media.MediaManager.handleAck(MediaManager.java:150)

    Best Regards

    Javier

     
  • yohannmartineau

    yohannmartineau - 2011-03-20

    hi javier,

    actually, all combination of sample frequency, sample size etc are not supported by sound cards. I used those values because they seemed to be working on most sound cards I tested, but they may not work on all sound cards; Try with other values (big endian, 8 bits sample size, PCM_UNSIGNED), etc. Are you working on Mac OS ? I possibly got issues with sound cards on Mac OS JVM.

    Regards,

    yohann

     
  • Anonymous

    Anonymous - 2011-03-21

    Hello,

    I used Fedora 14 64bits but i am change to Ubuntu 64bits. because I'm having problems with sound and other things

    in Windows works well?, have not tried it yet.

    Regads,

    Javier

     
  • yohannmartineau

    yohannmartineau - 2011-03-21

    I tested on windows 7 and windows xp and it worked, but it may depend on the sound card you're using. In theory, it should work with your pc, but unfortunately, in java, nothing guarantees a combination of sample frequency, sample size, endianness, sign, and  number of channels that will work on all computers.

     
  • Anonymous

    Anonymous - 2011-04-11

    Thanks,

    I tested en Ubuntu 10.10 Maverick and Fedora 14 and it worked (only that in Fedora i haven't install correctly the soundcard drivers).

    Regards

     
  • yohannmartineau

    yohannmartineau - 2011-04-11

    great! good to know that it works.

     
  • Anonymous

    Anonymous - 2012-07-31

    Please give your idea abt . I do not have an souncard installed . I got the same exception. Will I be able to recover this???

     
  • yohannmartineau

    yohannmartineau - 2012-07-31

    when you say you have no sound card, you mean it's integrated in your computer mother board? You can't use peers if you have no speakers nor microphone. As soon as you have a microphone plugged in your computer, it implies that you have a sound card, or the same features integrated on motherboard. I think you have sound features in your computer, but your sound card does not support this format. In this case it would be necessary to test several combinations, find one that works, and convert this format output to a standard one (used by default).

     

Log in to post a comment.