GNU/Linux + alsa: Can't get a line

How can I get a line on GNU/linux + alsa (ubuntu gutsy)?
Here's the testing code I'm using:
// audio format
AudioFormat format = new AudioFormat(44100f, 16, 2, true, false);
System.out.println("Sound Format: " + format);
DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
SourceDataLine line = null;
Mixer.Info [] mixerInfo = AudioSystem.getMixerInfo();
// Let's look for a line that supports our DataLine.Info
Mixer mixer;
for (int i = 0; line == null && i < mixerInfo.length; i++) {
     mixer = AudioSystem.getMixer(mixerInfo);
     System.out.println("Mixer: " + mixerInfo[i].getName() + ": " + mixerInfo[i].getDescription());
     try {
          line = (SourceDataLine) mixer.getLine(info);
          if (!line.getLineInfo().matches(info)) {
               System.out.println("The line doesn't match the format!");
               line = null;
     } catch (LineUnavailableException e) {
          System.out.println("Line Unavailable!");
          line = null;
     } catch (IllegalArgumentException e) {
          System.out.println("Illegal Argument!");
          line = null;
     System.out.println();
if (line == null) {
     System.out.println("No line was found");
     System.exit(1);
Here's the output I get:Sound Format: PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian
Mixer: ICH5 [plughw:0,0]: Direct Audio Device: Intel ICH5, Intel ICH, Intel ICH5
Illegal Argument!
Mixer: ICH5 [plughw:0,1]: Direct Audio Device: Intel ICH5, Intel ICH - MIC ADC, Intel ICH5 - MIC ADC
Illegal Argument!
Mixer: ICH5 [plughw:0,2]: Direct Audio Device: Intel ICH5, Intel ICH - MIC2 ADC, Intel ICH5 - MIC2 ADC
Illegal Argument!
Mixer: ICH5 [plughw:0,3]: Direct Audio Device: Intel ICH5, Intel ICH - ADC2, Intel ICH5 - ADC2
Illegal Argument!
Mixer: ICH5 [plughw:0,4]: Direct Audio Device: Intel ICH5, Intel ICH - IEC958, Intel ICH5 - IEC958
The line doesn't match the format!
Mixer: Java Sound Audio Engine: Software mixer and synthesizer
The line doesn't match the format!
Mixer: Port ICH5 [hw:0]: Intel ICH5, Realtek ALC202 rev 0
Illegal Argument!
Couldn't find a line
If I change it to big endian, I get the same output (except for the format, of course).
How can I solve this? Am I doing something wrong?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

I know nothing about Java Sound, but the items you're comparing in this line are not even close:
if (!line.getLineInfo().matches(info)) This is what println says they are (for the first mixer in my system):
line.getLineInfo====>interface SourceDataLine supporting 8 audio formats, and buffers of at least 32 bytes
info====>interface SourceDataLine supporting format PCM_SIGNED 44100.0 Hz, 16 bit, stereo, 4 bytes/frame, little-endian

Similar Messages

  • Have had my iPad 2 for 3 months. All of a sudden I can't get on line either with WiFi, which is working with my computer, or via the 3G celluar. What's wrong? How do I fix it?

    I have had my iPad2 for 3 months. All of a sudden I can't get on line with either my WiFi, which works with my Mac, or 3G celluar. A locked icon appears in the upper right corner of my screen near the battery indicator? Apple support tells me to go "Settings" and click "Reset Network." Cannot find a "Reset Network" button. What can I do to get on line?

    Thank you, Sir. You are a genius. I'm now on line and appreciate your help very much. The "reset" button was at the bottom, out of my sight, until I scrolled down as you suggested.

  • Can not get on-lin with pppoe

    i've set up ax with both admin utility and setup asst. to use pppoe... i still can not get on-line... it keeps looking for pppoe...
    there is no place to input a password for the pppoe account. wondering if this is the cause of no connection to the internet...
    mac's networking is set to airport using dhcp...
    is this the right set up?
    thanks,
    henry
    G5 1.8 DP, G4 1.25 DP, ibook g4   Mac OS X (10.4.5)  

    http://discussions.apple.com/thread.jspa?messageID=1117692&#1117692
    henry b wrote -
    "To check the PPPoE settings on the Airport Express, run the Airport Admin Utility. The default admin password is the word "public" without the quotes. Look under the Internet tab - it should show "connect using PPP over ethernet", and there will be a place to enter your internet account user name and password. "
    after the account name input there is button "Change password..." is this account passward function or is this the ax password change function... a little bit confusing.
    still not working will try turning everything off for the 20th time...

  • Can not get on line with new notebook

    can not get on line. *we have verizon, *bought new router to see if that was problem. *bought airport express to see if that would help, *my son, bs in computer security, has spent days starting over redoing, *we used his dell notebook to go to apple site (what's wrong with that picture?) it did work for awhile, wanted me to start time machine, but would go on line thru safari? says ethernet cables not connected - he tried 2 different ones. i'm at the point of taking this piece of #$@% back to best buy.

    Whoa, slow down. It's hard to understand exactly what's going on when you've explained your issue so unclearly.
    Please describe exactly what network setup you have at the moment - you have Verizon DSL? What router are you using, are you wired or wireless, how is the Macbook connected to the network, how are your other computer(s) connected to the network? Let's take it step by step and I'm sure we can find out what's going on.
    Matt

  • Installed windows update, appears to have been June 16 2011 at 3:00.13 am now can't get on line I did a restore to previous of install and all worked oK

    This started with windows 7 update June 16 2011
    installed windows update, appears to have been June 16 2011 at 3:00.13 am now can't get on line I did a restore to previous of install and all worked oK But This morn I restarted my computer and update reinstalled and I don't have a restore point that will help (my bad)

    These are the updates that were installed
    Security Update for Windows 7 for x64-based Systems (KB2476490)
    Installation date: ‎6/‎16/‎2011 11:31 PM
    Security Update for Windows 7 for x64-based Systems (KB2544893)
    Windows Malicious Software Removal Tool x64 - June 2011 (KB890830)
    Security Update for Windows 7 for x64-based Systems (KB2535512)
    Security Update for Windows 7 for x64-based Systems (KB2503665)
    Security Update for Internet Explorer 8 for Windows 7 for x64-based Systems (KB2544521)
    Security Update for Windows 7 for x64-based Systems (KB2536276)
    Security Update for Windows 7 for x64-based Systems (KB2525694)
    Cumulative Security Update for Internet Explorer 8 for Windows 7 for x64-based Systems (KB2530548)
    Security Update for .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 for x64-based Systems (KB2518867)
    Update for Windows 7 for x64-based Systems (KB2488113)
    Security Update for Windows 7 for x64-based Systems (KB2536275)
    Security Update for Microsoft .NET Framework 4 on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2 for x64-based Systems (KB2518870)
    Security Update for Windows 7 for x64-based Systems (KB2476490)
    Security Update for Microsoft .NET Framework 4 on Windows XP, Windows Server 2003, Windows Vista, Windows 7, Windows Server 2008, Windows Server 2008 R2 for x64-based Systems (KB2478663)
    Security Update for .NET Framework 3.5.1 on Windows 7 and Windows Server 2008 R2 for x64-based Systems (KB2478661)
    Security Update for Windows 7 for x64-based Systems (KB2544893)
    Installation date: ‎6/‎16/‎2011 3:00 AM

  • Hi, I have installed boot camp with wins xp home but i can't get on line with it. can only one help please.

    Hi, I have installed boot camp with wins xp home but i can't get on line with it. can only one help please.

    Please close this thread, I have managed to get a hold of a DVD including all the drivers, so I suppose that will work, if not one way then another.
    Thank you for the quick answers.

  • My Internet Explorer got corrupted, and I can't get on line to to get FireFox.

    I'm sorry that I'm not very computer savvy. Somehow my Windows Vista Home Edition was corrupted, and although I can still get email, Internet Explorer won't respond, and I can't get on line. Can I download Firefox to my wife's laptop, then somehow transfer the file via USB to my laptop?
    I don't know how else to get your browser.
    Thank You,
    Patrick Mulvany
    Newnan, GA

    Go to Mozilla.org and download the '''full '''installer.<BR><BR>
    About IE, try to do a '''Windows Update'''.

  • I can't get on line when the message "Blocked plug-in" appears.

    I can't get on-line when the message "Blocked plug-in" appears.   How do I get rid of this?

    If you actually can get online on some websites in Safari, but are unable to view the websites that depend upon the use of Adobe Flash Player, such as YouTube, then the problem is an outdated Adobe Flash Player version, and you need to update it.
    , System Preferences, Other, Flash Player, Advanced, Updates, Check Now
    (This screen shot is from OS X 10.8.5, so it might appear different than your OS X 10.6.8 screen, and a different release of the Flash Plugin might be installed.)

  • WRT54G CAN'T GET ON LINE

    TRYING TO HOOK UP A SECOND LAPTOP TO THE ROUTER. OLDER ONE IS WORKING FINE. BUT NEW ONE CAN'T GET ON LINE. I HAVE FOUR SOLID GREEN BARS FOR SIGNAL. BUT IT WILL NOT CONNECT. ALSO CAN GET ON LIN. IF MY DAUGHTER TAKE THE LAPTOP OUT TO WORK SHE CAN GET ON
    Message Edited by rzchrch on 04-02-2008 05:39 AM

    What version is it ?
    Check the firmware on the router and compare it with the list here.
    For instructions to upgrade the firmware, click here.
    After upgrading the firmware, you need to reset the router.
    Press the reset button on the router for 30 seconds.
    The Power light will start flashing.
    Turn the Router and the Modem OFF.
    Turn the modem ON first, wait for 10 seconds, turn the router ON, wait for 10 seconds, you should be ONLINE !!!
    If not you'll need to clone the MAC address on the router.
    Hope that helps.
    C | EH
    linksyshelp.blogspot.com

  • Can't get on line using Airport extreme.

    Today I switched to cable modem and when I am connected directly to modem I get on line easily. However connecting via Airport extreme I can not get on line. Not sure if I am connected correctly. Which port does modem cable go in? Which port does cable to computer go in? Anyone else having this problem?

    The cable modem must be cabled to the Airport Extreme WAN port - it is labelled with a "circle of dots" icon.
    After cabling the two together, pull power to both the modem and the Base Station for five minutes or more. Then plug the modem into power and wait a minute. Then plug Base Station into power and wait for it to boot up. Then see what happens.

  • Can't get on-line with Airport Extreem

    Hi all,
    this is my first post on this forum. I have tried to set-up a wired network using Airport Extreme between a Mac Mini and a G5 1.8 Dual. I was able to see each computer over the network but I could not get internet access.
    I tried the unplug every thing route but that did not help. I am hooked up to the internet through a cable modem and can get to the internet without using the Airport Extreme going straight to the ethernet connection on the back of the computers.
    What am I doing wrong?
    Todd

    Well now I can get on-line on the Mac Mini (the computer used to configure the Airport Extreme) but I still can't get on-line on the G5.
    Todd

  • How can I get "IMAQ Line Fit" stable (with the same points)

    How can I get "IMAQ Line Fit" stable (with the same points)
    I my vision applications I use a lot off times "IMAQ Line Fit"
    some times the results are not Stable.
    See vi and word document attached.
    When I take the same points but in a other order (sort)
    then suddenly all points are used.
    In this case I was looking for a edge in vertical direction (Y).
    I found the points but "IMAQ Line Fit" did not function well.
    I tried changing all settings like pixel radius and minimum score and
    also threshold and so on. But no result.
    Then I sorted the points reversed and that worked. See vi.
    I use labview Labview 8.6.0 and IMAQ machine vision.
    Maybe this problem is solved in a newer version.
    Please let me know.
    Thanks
    Attachments:
    TEST-imaq-line-fit-86.vi ‏169 KB
    IMAQ-Fit-Line-Problem-86.doc ‏230 KB

    Thank You for your reaction Hossein,
    This "one application" uses "Line fit" about 20 000 000 times a day.
    about 200 will go wrong. With your setting the the "Line fit" for this occasion will work but others will go wrong.
    A algorithm should be:
    1e Stable, when using the same points and settings the result MUST be the same. How the points are sorted should not matter.
    2e Accuracy
    3e Speed
    4e Testing. Is very difficult but al least close points and the same points and sorting ... should be done
    NI now as made a " IMAQ Line Fit" Problem CAR (Corrective Action request) 298016.
    so in the future there will be a update.
    In the mean while a made a line fit which uses Bisquare option from Linear Fit.vi :
      from C:\Program Files\National Instruments\LabVIEW 8.6\vi.lib\analysis\6fits.llb
    This is a temporary fix because "IMAQ Fit Line VI" is not so stable.
    Because outliers should be rejected only Bisquare does this reasonable.
    This program does NOT USE "Minimum Score" and "Pixel Radius"
    Valid fit = When there are enough points within Outlier_Distance.
    Algorithm steps:
    - Determine if line is more horizontal then vertical, Compare DeltaX with DeltaY
    - If DeltaX <= DeltaY then SWAP X Y and later Swap back
    - Sort Points at on X value
    - First : Bisquare Linear Fit
    - Calculate distances to the found line for all points
    - Inliers: Points within Outlier_distance
    - Outliers: Points outside Outlier_Distance
    - Only use Inlier Points
    - Check again if DeltaX < DeltaY then SWAP X Y later SWAP back again
    - Second : Bisquare Linear Fit only with the Inlier Points
    - Results are from the second fit
    Warning : This Program is Not so accurate and Not so fast
    See attachments it is in labview 8.6
    If some has a improvement please let me know.
    Thanks
    Attachments:
    svi_fit_line_Bsquare_and_draw.vi ‏18 KB
    Fit_Line_Bisquare_Linear.vi ‏40 KB

  • Can't get mac line back online - a continual problem

    Hello,
    I've read most all the posts I can find on this subject.  Mac air mac mail goes offline and I just can't get it back on.  I've changed nothing with MY mail, but all of a sudden it just goes offline, then I cannot get it back online.
    I have tried "network diagnostics" via going to System Preferences > Network > and my computer is on line.
    If I go to the Mail Connection Doctor, the top line says: Mail was able to connect to the Internet; however, all my accounts have red dots, not green ones, AND the actual "network diagnostics" option is grayed out.
    On every email account I have it says: Could not connect to this SMTP server.  Check your network connection and that you entered the correct information in the Account preferences (nothing has changed so all information is correct). Also verify that the server supports SSL.  If it does not, deselect the "Use SSL" checkbox in the Advanced tab of Account preferences.  I have tried it both ways, checked and unchecked. My server supports SSL, and it was always set with that checked.
    I was getting and sending mail a couple days ago.  Nothing has changed except Mac mail and not being able to get it back online.  And this happens all the time.  It gets so old.
    I also went to Mailbox > Take all accounts ON LINE > but nothing happens when I click on that.  I cannot click on take it OFF LINE because it's grayed out.  I thought I'd toggle back and forth and see if it helps.
    So everything is just grayed out, yet I am connected to the internet and conneted to my WIFI and nothing has changed from a couple days ago, EXCEPT my mail is now OFFLINE and I can't send or receive.  Well, the "mail is offline" is grayed out, and "take all mail online" is not. All the accounts have the little triangle icons next to them.  If I click on those it says Connection Failed: 5 accounts have connection failures. Click the indicator next to each account for details.  Then I get two options "stay offline or take all accounts online. 
    So many conflicting messages -- it's online, take it off, it's off line, take it on, unable to connect to internet (except I'm here connected to the internet), network diagnostics grayed out, yet status tab in the bar across the top says "OFFLINE" and there is no way to put it back online.
    Really crazy! This happens all the time -- all the time.  And then I post and browse and google and nothing gets accomplished and I forget about it and use other computers and devices to send email.  Then one day it'll just start working again.
    How can I fix this once and for all and stop this nonsense of having it goo offline and not being able to get it back on using ALL the options available?
    I need to add: I have deleted the account and re-added the account, but I always get the mail message:
    The MobileMe IMAP server “mail.me.com” is not responding. Try checking the network connection, and that the server name is correct. Otherwise, the server might be temporarily unavailable. If you continue, you might not be able to receive messages.
    Mobile Me is non existent now, but that is what MY computer message tells me.  And again, my network connection is fine, just not for EMAIL.
    Thanks for any help.
    Message was edited by: Pamela Kinann

    Please read this whole message before doing anything.
    This procedure is a diagnostic test. It’s unlikely to solve your problem. Don’t be disappointed when you find that nothing has changed after you complete it.
    The purpose of the test is to determine whether the problem is caused by third-party software that loads automatically at startup or login, or by a peripheral device. 
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards. Boot in safe mode* and log in to the account with the problem. The instructions provided by Apple are as follows:
    Shut down your computer, wait 30 seconds, and then hold down the shift key while pressing the power button.
    When you see the gray Apple logo, release the shift key.
    If you are prompted to log in, type your password, and then hold down the shift key again as you click  Log in.
    *Note: If FileVault is enabled under OS X 10.7 or later, or if a firmware password is set, or if the boot volume is a software RAID, you can’t boot in safe mode. Safe mode is much slower to boot and run than normal, and some things won’t work at all, including wireless networking on certain Macs. The next normal boot may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin. Test while in safe mode. Same problem? After testing, reboot as usual (i.e., not in safe mode) and verify that you still have the problem. Post the results of the test.

  • I can NOT get on Line with Firefox at all, just IE

    my computer can get on line with no problen on internet explorer but firefox will not work at all. I have restored the computer & deleated firefox and reloaded it 2 times still No Good. I keep getting the message sauing it can not connect to firefox. please help, thanks, DanO'

    Firefox 4 requires at least OS X 10.5 and an Intel Mac.
    * http://www.mozilla.com/firefox/4.0/system-requirements/
    For an unofficial Firefox 4 compatible version (TenFourFox) that runs on PowerPC Macs with OS X 10.4.11 or OS X 10.5.8 you can look at:
    * http://www.floodgap.com/software/tenfourfox/
    Firefox 3.6.x (Mac OS X 10.4 and later) can be found here:
    * http://www.mozilla.com/en-US/firefox/all-older.html
    * http://kb.mozillazine.org/Bookmarks_history_and_toolbar_buttons_not_working_-_Firefox
    * http://kb.mozillazine.org/Lost_bookmarks

  • Can't get on line through wireless

    I am new to wireless. I get on line and then the server goes down saying that it can not find a signal. But my modem lights all work and my roommates all get on line without any problem with their computers. This was working fine up until yesterday, then it started saying "Error, can not find." Please help...

    See if anything in the following Knowledge Base Article is of any help:
    http://docs.info.apple.com/article.html?artnum=106858 AirPort troubleshooting guide.
    Otherwise, suggest that you crosspost in one of the AirPort Forums where the Airport users hang out.
    Good Luck!

Maybe you are looking for

  • Travel adapter for IPod touch 32 GB 3rd generation

    Dear All, I do have a brand new IPod touch 32 GB, 3rd generation. As I will be travelling to the US I need a travel adapter. The travel adapter offered by Apple is per description only compatible with the 1st and 2nd generation. Are you experienced?

  • (SOLVED) Pacman mirrorlist & DB Sync issue.

    Hi, I messed with HDD through BSD and my HDD was wiped clean!(grr) anyways I reinstalled Arch with 2009.08 iso image. I've setup connections and enabled repos and updated mirrorlist. I can ping google and browse it through links. System behaves norma

  • Connecting Ethernet device directly to Verizon fios main box.

    I'm trying to connect a home security system via cat5 to the Internet. The security system is mounted to the wall in my garage next to the Fios box. Is it possible to activate the Ethernet port in the customer access panel inside the Fios box so I ca

  • Dsp:select issue in setting catalogId in items of CartModifierFormHandler

    I am using the dsp:select as below: <dsp:select bean="CartModifierFormHandler.items[0].catalogRefId"> <dsp:option value="sku90001" /> <dsp:option value="sku87960" /> </dsp:select> But i am getting null pointer exception when the page is getting loade

  • Where Is it?  - iPhone upgrade download??

    Hi to all Is it me? Is it my age? I simply don't seem able to find the download to upgrade iphone for Multiple messages, and all the new web apps etc; please point me in the right direction. Ta