Cannot recognise any sound devices in Linux using Java sound!

Hi there - I'm new to Java sound, and can't even get my foot in the door on my Linux system. Even thought my speakers and microphone are fully functional on my system (I can record, playback, etc. using other programs) I cannot get Java to find the microphone, speaker, anything. I've tried calling "AudioSystem.isLineSupported(Port.Info.MICROPHONE)", which returns false, as with all the other Port.Info.... objects.
I'm sure there are no programs using my audio devices (used lsof | grep snd and lsof | grep dsp, then killed the only program that had anything open) and I've tried running my Java program as the super-user too, but to no avail.
One thing I CAN do is get sound from /dev/dsp - I can put this into a byte array and play it back later, but I don't know how to find out what sort of codec it uses, how to merge it with Java sound, or anything like that.
Any help would be much appreciated!
If it makes any difference, I'm using Xubuntu 8.10, and I normally don't use a microphone or flashy surround-sound speakers, so I've not touched the sound system since I installed Linux.

Ports are tricky...and by tricky, I don't mean complicated so much as a pain.
Try using Line.Info objects instead of Port.Info objects and see if you can get any lines.

Similar Messages

  • I have iPhone 6,  8.3. I cannot use bluetooth at all from my device, even to connect my macbook pro. I did all the recommended trouble shooting such as  reboot and reset network settings. but it does not recognise any bluetooth device. Pls help.Thank

    I have iPhone 6,  8.3. I cannot use bluetooth at all from my device, even to connect my macbook pro. I did all the recommended trouble shooting such as  reboot and reset network settings. but it does not recognise any bluetooth device. Pls help.Thank you.

    See iPhone BT profile on what can be connected/paired:
    iOS: Supported Bluetooth profiles - Apple Support
    And BT troubleshooting:
    iOS: Troubleshooting Bluetooth connections - Apple Support

  • I don't own any Apple devices. I used to though. How do I access my music in the cloud?

    The dilema is in the title. I don't own any Apple devices. I used to though. I owned a nano I bought music for through iTunes. But now I own an Android, and a PC. But I'd still like to access and listen to my previously purchased music that I bought through iTunes. However, I can't access the iCloud. I downloaded the iCloud Control Panel for PC. It asks me to sign in with my Apple ID. But when I try to sign in, it says I'm not signed up for the iCloud. But there isn't anywhere to sign up online! Unless I just haven't found it yet. I can't find anywhere to sign up online or in iTunes. The lack of tech support and the difficulty of use is precisely why I switched to Android and PC. I just want the music I PURCHASED.

    Hi there Ginger,
    Welcome to Apple Support Communities.
    The article linked below provides troubleshooting tips that should help you resolve the iTunes Match issue that you're running into, where most of your music isn’t appearing in iCloud.
    How to troubleshoot iTunes Match - Apple Support
    Songs appear to be missing
    Songs containing DRM (Digital Rights Management) might not appear in iCloud, or might appear grayed out. This can occur if your computer is not authorized to play that content. Try authorizing your computer, then manually update iTunes Match. To determine what Apple ID your computer needs to be authorized for to play a specific song:
    Locate and select the song in your iTunes library.
    Choose File > Get Info.
    In the Summary tab, locate the Account Name field in the right column. Write it down.
    Click OK.
    Choose Store > Authorize this Computer.
    Type in the account name from the Summary field and enter its password. Click Authorize.
    Choose Store > Update iTunes Match.
    So long,
    -Jason

  • I cannot open any pdf files! I used to be able to. Have a mac.

    I cannot open any pdf files. I used to be able to. If I open them I get a blank screen. Have a mac. Help!!!!!

    Hi Charlie,
    First, thanks for responding. These are mostly emails with attachments or documents that I have. I download them and once I open them the page is blank. I also cannot look at them in Preview. The same problem. I called Apple and they said they assume I have an older software version. They are going to send new software. I am not really sure this will solve my problem. If you have any suggestions, please let me know. Thanks!

  • I cannot open any attachments in hotmail when using firefox 4 beta

    I cannot open any attachments in hotmail when using firefox, but had no problems with the attachments when using safari. I much prefer using firefox and don't want to have to change.
    Can anyone help please?

    Same here, firefox cannot open any attachment, the page simply refresh itself or perhaps its not refresh but some kind of ajax. But NOTHING happens at all.
    Attachment downloads fine if I use IE though.

  • Open PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    appi wrote:
    Hi.. I found the JDIC binary files. There are different binaries for all the plateform. Is there any solution which is independent of plateform.Yes, and we already told you: Use JDK6, which has those libraries built into the standard class library.
    How can I use these binaries in my existing project. does it work, If I place them at same place where other .class files are kept.Read the documentation of the JDIC project. I'm sure they answer this question in their FAQ.

  • Open a PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    One thread is enough:
    http://forum.java.sun.com/thread.jspa?threadID=5267458

  • Using Java Sound in Eclipse.

    Can anyone tell me where to put the java soundbanks that i downloaded in order to use Java sound in Eclipse?

    I'm not familiar with this particular issue, but I believe jsresources.org has lots of information on installing soundbanks.

  • Capturing audio through applet using Java Sound

    hi fellows i need ur help.
    I am working on a voice project to Capture & Play the sound using java sound API instead of JMF. I can capture , play and transmit the sound through application. It works pretty fine but when i convert it to the applet, it is not working.
    I got the full system permissions and also signed the applet for Internet Explorer. Also i packed the
    javax.sound.midi.*
    javax.sound.sampled.*
    classes in the signed cab.
    After doing all this i am getting the AudioFormat not supported exception. I changed the format and used all the combinations but still getting this error
    No line matching interface TargetDataLine supporting format PCM_SIGNED, 16000.0 Hz, 16 bit, mono, big-endian, audio data is supported.
    java.lang.IllegalArgumentException: No line matching interface TargetDataLine supporting format PCM_SIGNED, 16000.0 Hz, 16 bit, mono, big-endian, audio data is supported.
         at javax/sound/sampled/AudioSystem.getLine (AudioSystem.java:312)
         at com/vsoft/voice/VoiceRecord.run (VoiceApplet.java:93)
         at java/lang/Thread.run (Thread.java)plz help me to sort out this problem.

    plz have a look over this problem

  • Emulating sox trim using java sound APIs

    Hi,
    I would like to know if there is a way to split large wave files into smaller ones (approx 5 min clips, similar to "sox trim") using java sound APIs? I tried the following, but it doesn't seem to work for me
    1. Open a wave file using AudioSystem.getAudioInputStream();
    2. Read 300 * sample_rate * bytes_per_sample bytes into a buffer.
    3. Read the written bytes back using AudioSystem.getAudioInputStream().
    4. Write the stream using AudioSystem.write();
    I can't get step 3 to work, possibly because headers are not written into the buffer and AudioSystem complains about unknown audio format. How do I get this working?
    TIA.

    Okay, I figured a way to do this without using the sound APIs. Now, I am reading the header and data separately, splitting the data and copying the header on each segment. Sorry to have bothered everyone.

  • Satellite A30: Doesn't recognise any USB devices.

    My computer doesn't recognise any of the devices when connected to the USB Port on my Satellite A30. After dowloading SP2 I was able to install the printer but I can't use it because there is no printer icon on the tool bar. If i want to print anything i get the printer window, i select the print then it goes to MS Office Image writer. Basically, I can't use my printer or any other device connected to a USB port.
    However, It was working perfectly well when I had the XP home edition but I can't reinstall that one because there is something wrong with the recovery disk that's why I had to install the XP Pro.
    Also, I used to get a sound, letting me know that a device has been connected. I don't get that anymore nor the icon on the toolbar.
    Is there anything I could do to resolve this issue please? Is it possible to obtain another recovery disc somehow? Obviously this is something to do with XP Pro software but I don't know what to do.
    Could you please help me?
    Thank you!

    Hello Juan!
    This is what the problem is the only printer window i have is the MS Office Image Writer. I do not have any other printer window. If I use add a printer, then the wizzard can't detect a USB device.
    I have just checked the link you gave me and did exactly what it said but it just doesn't help. It is not just my printer, it doesn't detect any device i connect to it. For example, I can't update my ipod anymore because the computer doesn't detect the ipod when it is connected.
    I really don't know what the problem is! It was working perfectly fine before the upgrade and for the upgrade i have used the official MS Windows XP disk.
    You woudn't know how to format the HDD by any chance, would you?
    Thank you for your help

  • After update iTunes to the version 11.2.2(3) on MacBook Pro I cannot connect any apple device. iTunes is "hanging". do U have the same problems?

    after updat iTunes to the 11.2.2(3) ver I cannot connect any device iTunes after connect device (iPad3, IP5S) is hanging.. and I have to force iTunes to close. do U have the same problems?

    Hey there Michal115,
    It sounds like you are unable to connect your iOS devices without it becoming unresponsive. That would frustrate me too. I would use the following article about that very issue to help you resolve that:
    iTunes: May become unresponsive when connecting iPhone, iPad, or iPod touch
    http://support.apple.com/kb/ts3219
    Start with these 3 steps to make sure the other devices are up to date as well, and there is additional troubleshooting to be done in the article if needed:
    Install any available software updates for your computer.
    For Mac OS X: Click the Apple () menu, choose Software Update, and follow the on-screen instructions.
    For Windows: Refer to the documentation for your computer for instructions on using Windows Update to update your computer.
    Update iTunes to the latest version.
    For Mac OS X: Click the Apple () menu, choose Software Update, and follow the on-screen instructions. You can also download iTunes from the Apple website.
    For Windows: Use Apple Software Update, or download iTunes from the Apple website.
    Test with automatic syncing disabled.
    For Mac OS X: Click the iTunes menu and choose Preferences. Click the Devices tab and place a check next to option to "Prevent iPods, iPhones and iPads from syncing automatically." Click OK.
    For Windows: Click the Edit menu and choose Preferences. Click the Devices tab and place a check next to option to "Prevent iPods, iPhones and iPads from syncing automatically." Click OK.
    Reconnect your device and test to see if the issue still occurs. If your device is recognized successfully, you may be able to isolate which type of data is causing the issue. Do this by deselecting all syncing options under each of the syncing tabs and then sync. After that, re-enable your sync options one at a time until the issue returns.
    Note: If the issue only occurs when syncing data from the Info tab is enabled (For example: Contact, Calendar, Mail account or Bookmark syncing), reset the Sync History (for Mac OS X instructions see this article, for Windows see this article).
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • Linux and Java sound - map mixers to devices

    Hi,
    I have a question regarding Java Sound API and Linux. I need to query a list of sound devices and let the user choose one of them for further audio operations. This works using the
    AudioSystem.getMixerInfo()call. However, the names of the mixers are not very useful. I find the following mixers:
    Intel [plughw:0,0], version 1.0.23
    Intel [plughw:0,2], version 1.0.23Is there a way to get better names, similar to what Gnone or KDE sound panels display?
    When I run the same code under Windows, the output is much better.

    Try the code from the following article:
    http://www.developerfusion.com/article/84314/wired-for-sound/

  • Cannot restore ANY iOS device or version from my Macbook pro.

    This seems to be a problem just with my MacBook Pro. But I have iTunes 10 and I cannot restore ANY of my iOS devices. iPad/iPhone restores alwasys freeze at the same two thirds location. It is also idependant of iOS version. I have tried a few versions and alwasy the same problem.
    I am forced to force quit and do the restores on an alternate machine which works perfectly. What is wrong?
    And yes, I have fixed permissions >:(

    I've the same problem.
    You have solved?
    g

  • How to run SQL script file on Linux using Java ?

    Hi,
    I need to execute .sql file using java. I used following approach for this.
    private void runScriptEvent(java.awt.event.ActionEvent evt) {                               
            String sqlOutput = "";
            String sqlPromptLines="";
            String currentFunctionName = "";
            if(con!=null){
                String userName = jTextField4.getText();
                String password = jPasswordField1.getText();
                String databaseName = jTextField3.getText();
                try {
                    String script_location = "";
                    ProcessBuilder processBuilder =null;
                    Process process = null;
                    //File file = new File("C:/ScriptFile");
                    File file = new File("./SQL_Script");
                    //File file = new File("E:\\install\\SQL_Script");
                    if(file.exists()){
                        File [] list_files= file.listFiles(new FileFilter() {
                                        public boolean accept(File f) {
                                        if (f.getName().toLowerCase().endsWith(".sql"))
                                        return true;
                                        return false;
                    int count = 0;
                        for (int i = 0; i<list_files.length;i++){
                            script_location = "@" + list_files.getAbsolutePath();//ORACLE
    //currentFunctionName = list_files[i].getName();
    StringTokenizer st = new StringTokenizer(list_files[i].getName(), ".");
    while(st.hasMoreTokens()) {
    currentFunctionName = st.nextToken();
    String extention= st.nextToken();
    System.out.println("Function Name = "+currentFunctionName + "\t Extention = " + extention);
    processBuilder = new ProcessBuilder("sqlplus",userName+"/"+password+"@"+databaseName, script_location); //ORACLE
    processBuilder.redirectErrorStream(true);
    process = processBuilder.start();
    BufferedReader in = new BufferedReader(new InputStreamReader(process.getInputStream()));
    String currentLine = null;
    while ((currentLine = in.readLine()) != null) {
    sqlPromptLines = " "+sqlPromptLines + currentLine +"\n";
    count ++;
    System.out.println(count+" " + currentLine);
    if(currentLine.equalsIgnoreCase("Function created.")){
    sqlOutput = "\n" sqlOutput currentFunctionName + " " currentLine"\n" ;
    break;
    }// end while
    in.close();
    process.destroy();
    }//end for
    }//end if file exists
    } catch (IOException e1) {
    jTextArea1.setText(e1.getMessage());
    System.out.println("Script Done");
    jTextArea1.append(sqlOutput);
    }// end id Connection is not null
    Above code working appropriate on Windows but not on Linux.
    is there any changes needed ?
    Regards,
    Ajay
    Edited by: Ajay Sharma on Nov 21, 2012 6:43 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Hi gimbal2,
    about code
    jTextArea1.setText(e1.getMessage());I am using this code so that the user will be prompted with a message rather than stack trace.
    About the issue I am getting on linux i believe its because of following statement.
    processBuilder = new ProcessBuilder("sqlplus",userName+"/"+password+"@"+databaseName, script_location); //ORACLERegards,
    Ajay
    Edited by: Ajay Sharma on Nov 23, 2012 12:05 PM
    Edited by: Ajay Sharma on Nov 23, 2012 12:06 PM

Maybe you are looking for