Java sound app works on Mac but not on Windows

I am working on a program that needs to play a sound Clip and it doesn't work on XP but it does on OS/X.
I've reduced the problem to this simple test program. On my PC, the sound I hear on the speakers is just a little burst of noise, whereas it's fine on my Mac. I used one of XP's system wav files, and verified that it does play normally on the PC via other means (iTunes, etc.). I'm using the latest JDK/JRE everywhere. Here's the sample code. Anything obviously wrong here?
import java.io.*;
import javax.sound.sampled.*;
class ClipTest
    public static void main(String args[])
            try
                Clip soundClip;
                AudioInputStream soundStream;
                File audioFile = new File("CHIMES.WAV");
                soundStream = AudioSystem.getAudioInputStream(audioFile);
                AudioFormat format = soundStream.getFormat();
                DataLine.Info info = new DataLine.Info(Clip.class, format);             
                System.out.println(format.toString());
                soundClip = (Clip)AudioSystem.getLine(info);
                soundClip.open(soundStream);
                soundClip.start();
            catch (Exception e)
                e.printStackTrace();
}

Solved my own problem: adding a Thread.sleep(1000); after starting the Clip worked. Looks like the app was terminating before the sound could finish playing. Obviously something is different between the way the Mac and XP JRE handles the sound thread with respect to the rest of the app.

Similar Messages

  • USB FLASH DRIVE WORKS ON MAC BUT NOT ON WINDOWS... CAUSE I ERASED IT IN MAC

    I decided to take my work flash drive home to work on a file. At home I saw that some weird files were on the flash drive and wouldn't delete, so I decided to save my files on my Mac and erase the USB flash drive. I selected the flash drive (by the way it's a 2 GB flashdrive) and I used the SECURITY OPTION 35 PASS ERRASE. Format: MS-DOS (FAT).
    Everything was fine until I took my flash drive to work and plugged it on a Windows XP Computer and it appeared as Drive E I think and when I tried to open it it asked me to format it. I risked it and clicked OK and it said that I didn't have sufficient rights or something.
    SUMMERY:
    2 GB USB ERASED USING MAC DISSK UTILITY
    EVERYTHING FINE UNTIL I PLUG IN THE FLASH DRIVE IN A WINDOWS
    WINDOWS ASKS ME TO REFORMAT FILE
    I PLUG IT INTO A MAC COMPUTER AT WORK AND IT DOES WORK
    IF ANYBODY KNOWS HOW DO I FIX THIS THANKS?

    The drive is probably now formatted for a Mac only file system. To format for a PC:
    Insert the drive in the Mac and start Disk Utility (Utilities folder).
    Select the drive in the left column. Be sure to select the drive (all the way to the left) not a volume (indented below the drive name).
    Select the "Partition" tab.
    Set "Volume Scheme" to "1 Partition" (not "Current" even if it's already one partition).
    Click the "Options" button".
    Select "Master Boot Record".
    Click the "OK" button.
    Enter a volume name (all uppercase).
    Set "Format" to "MS-DOS (FAT)".
    Click the "Apply" button.

  • Link works on mac but not on pc

    Hi -
    I am trying to insert a jpg into a dreamweaver file.
    I then upload the html file along with the jpg to my server in a folder called "layout"
    So the url is:  http://www.mysite.com/layout/test.html
    The link works on mac, but not on pc's.
    Any idea why?
    Some links work on pc's like this, and others don't.
    Thanks- It's driving me crazy!!

    The link is not correct....you have it listed as" mysite.com", which I assume is where you are to insert the name of your url.
    Gary

  • My Ipod shuffle appears in itunes on mac but not on windows 7 even though we have the latest update of itunes. We have also tried the other solutions on the apple support site.

    My Ipod shuffle appears in itunes on mac but not on windows 7 even though we have the latest update of itunes. We have also tried the other solutions on the apple support site.

    Hi reinkristine86!
    I know you’ve said that you have tried other suggestions for troubleshooting this issue, so pardon me if you have already seen this article, but have you tried all of the troubleshooting steps listed in the article below?
    iPod not recognized in My Computer and in iTunes for Windows
    http://support.apple.com/kb/ts1369
    Thanks for coming to the Apple Support Communities!
    Cheers,
    Braden

  • Map Widget - Works on Mac but not in Author

    OK, I'm a nube when it comes to Dashcode just so that's out there. I managed to build a custom map widget with Google Maps. The widget works perfectly on my Macs but not in Author. In Author the default place holder remains empty. If I click "edit HTML" I get the Google map, but it's just a generic USA, not the one I created w/ places. Also iBooks refuses to import the book to my iPad until I delete this map.
    Do I need to do something or insert special code in Dashcode to make this widget "Author compatible" or are map widgets not allowed?

    jfk0404 - I believe that what you're referring to as the "unattractive cartoon-like figure in the widget" is actually the placeholder image for the widget as it appears inline on the page. Once you click that cartoon image the actual widget takes over full screen and loads the html content displaying a functional full size google map.
    To replace the cartoon icon you have a few options. The first thing to do is create a new .png file to represent your widget as the placeholder image enticing your readers to click to open the full screen widget and load its dynamic contents. Perhaps a screen grab of your map would be a good idea?
    Easy:
    Drag your brand new .png image from the Finder into your open source iBooks Author file dropping it on the cartoon image. Done.
    More Complex:
    Right click (control-click) on the xxx.wdgt file that downloaded from http://classwidgets.com and choose "Show Package Contents." A Widget file is really just a special folder bundle with a .wdgt extension. In there you will find the Default.png file. Highlight the file and press the space bar to see a preview in the Finder's QuickLook feature. That's your cartoon image. Now replace that file with the one you created above. Done.

  • QTSS Works on Mac but not the other

    I have a Server running OS X Server 10.5.8. I am running QTSS and Apache on this machine, however I am having issues with Quicktime streaming. One mac here is able to successfully stream but all other macs on our network fail to connect despite the QTSS "Connections" window shows the connection to the machine trying to stream the video. In the end on the client Quicktime X shows "Not Found" however I am able to connect to the server via other services (ARD, AFP, HTTP). I can post any logs that might help.
    Thanks in advance

    I couldn't remember what the Display Preferences had said when we tried this last spring and again in the summer, so tonight we connected it again, and wouldn't you know - it worked just fine. We didn't do anything different, so I have no clue as to why it worked this time but not before. He's thinking about getting his own big display, but didn't want to waste his money if he couldn't get it to work, so now I guess we're shopping for another 23" display - probably a used one. Thanks!

  • Movie works on mac but not PC...help!

    Hi!
    Hopefully someone out there can help me...
    I am trying to make a video play on a website that I designed. The video will play on a mac, but not a PC. When the user clicks on the link, the video (.mov) should start playing in whatever media player that computer has installed, either quicktime or windows media player. It isn't working on a PC. Maybe if I convert the video file to a windows media file or to a file that is easier read my a PC it would work? I don't know how to convert quicktime files into .wmv files.
    help!!!
    if you want to see the video, click on the "reel" link of www.williamday.net, then click on "reel" again in the middle of the page.

    The problem is your page code (or lack of it).
    You are directly linking to the file and bypassing any browser plug-in.
    http://docs.info.apple.com/article.html?artnum=61011
    http://developer.apple.com/internet/ieembedprep.html

  • Web graphic links work on Mac, but not PC

    I have two websites. The old one is DogToysAndTreats.com. The new one is FunStuffForDogs.com. I need to change the home page graphic on both of them to point to my shopping cart pages. I have done this and published the changes on both sites. It works on my Mac but not on my PC.
    On www.funstufffordogs.com, the graphic at the top with the bulldogs is supposed to link to http://store.funstufffordogs.com/storefront.aspx. Same thing on www.dogtoysandtreats.com. It works on my Mac in both Safari and Chrome. On my PC, it doesn't work on IE, Safari or Firefox. (BTW, I haven't worked on any of the other links until I can figure out how to do it properly.)
    I don't get why the platform has anything to do with it.
    Lisa

    Looking at your source, the problem may be that the images refer to an external server link from the one actually hosting the website page.  Whenever you try to mix servers on a single page, you depend on the network connectivity being reliable to all the servers simultaneously.  This can be as much a problem on a Mac as a PC.  Sometimes routers have bad router tables, or internet providers do, and this can cause issues for multiserver websites.  Using on your router & network settings an OpenDNS DNS server can help:
    http://www.opendns.org/

  • PC webcam works on Mac, but not on Toshiba P35...?

    I recently got the Logitech Quickcam Communicate Deluxe webcam, which is made to work with Windows XP & Vista computers. Without installing a thing, I plugged it in to my Mac (running Tiger 10.4.11) — and it works flawlessly (the camera is Video Class [UVC] compliant, which works with built-in drivers on this Mac). However, this camera is specifically made to run with Windows, not Mac, so I was very surprised to have horrible results on the Toshiba laptop.
    We've spent days trying to get acceptable results, but the video is extremely slow and choppy on the Toshiba. I've talked with Logitech, and the Toshiba exceeds all of it's requirements to run the camera — they are stumped, and suggested we contact you for help.
    Here's the rundown:
    Toshiba Satellite (P35-S629)
    Pentium(R) 4 CPU 3.33GHz
    1.00GB of RAM
    Windows XP
    Home Edition
    Service Pack 3
    (all Windows updates are up-to-date)
    What we've tried:
    • Installing the latest, updated Logitech Drivers and Software, doing a"Clean Boot" so as not to conflict with any other software
    • Uninstalling the Logitech Software
    • Uninstalling the Logitech Drivers and using the pre-installed Drivers on the Toshiba
    I've checked the CPU usage, nothing running except the minimum, maybe 1 or 2%.
    The Toshiba has three Enanced USB 2 ports — it makes no difference if the camera is the only USB device connected.
    I've run the camera with the Logitech Software, and without it, directly in Skype — the results are the same, a frame every few seconds. Changing the Exposure rate (in Logitech's Software, and/or in Skype's) has no discernable effect.
    Is there any other setting on the Toshiba I can try to adjust, or a driver that might work better than either the Windows drivers (or the Logitech Drivers)? Logitech tells us that because the camera works flawlessly, with no choppyness whatsoever, on the Mac, that this is a problem with the laptop. Any suggestions on what we could try would be hugely appreciated!
    Thanks so much,
    Jenrou

    Well ... I tried a powered usb hub — made sure to get a hi-speed AC powered usb 2.0 one (480Mbps transfer rate, 500 mA each port) — but it made no difference. I also tried a few other things, and maybe (?) the answer is in what I found out.
    1. Under My Computer>Scanners and Cameras I can open if I use the xp installed drivers, but not with the Logitech drivers installed. Using the xp drivers, when I open I get a little video screen, and (ah ha!) it runs smoothly, no delayed choppy-ness, but (ah crud!) it has constant interference in the picture: the video blips with Red, Blue, Green and Blk/Wht images lasting a fraction of a second. But it does move smoothly, as if live.
    2. Tried another video program, to see if this might work runing something else, so I downloaded a basic video capture program (Debut Video Recording) and ran that (btw it would not run with the Logitech drivers, only with the xp drivers). It also ran smooth video, and without the blips flashing across it; but this program also produces a low res image — a jaggy, pixilated one. But ... it does react, again, smoothly as if live.
    Skype, Quikcam Software, and Sightspeed all still run video very slow and choppy.
    So now I'm back to wondering if this is a hardware issue. Is it a deficiency with the Satellite P35 to process or render webcam video? For what it's worth, the laptop can play video off the internet, or dvd movies just fine. the camera runs fine, but 1. and 2. above make me wonder if the laptop can't process a decent live camera feed? And if it is a hardware issue, is there any upgrade option or solutions?
    (note: Toshiba's description calls the P35-S629 "the ultimate gaming machine, loaded with the latest in everything, including a 17" WXGA display w/TruBrite for the best in graphics. The 16:9 aspect ratio make it perfect for viewing wide-screen format movies!The Mobile Intel Pentium 4 Processor supports Hyper-Threading Technology, improving the performance of many applications. The ATI discreet graphics optimize visuals without compromising system performance....producing images so sharp they are mesmerizing from across the room...With razor-sharp images, robust sound and intense power it all adds up to the ultimate gaming machine.")
    P35-S629 Specifications
    Processor and Memory
    Processor Brand:  Intel Processor
    Class:  Mobile Pentium 4 Processor
    Speed:  3.33 GHz
    Installed Memory:  512 MB    [we have 1 GB]
    Maximum Memory:  2 GB Memory
    Technology:  DDR SDRAM Cache Size 1 MB
    Storage Hard Drive Capacity:  100 GB
    Included Drives:  DVD±RW
    Display and Graphics Display Type:   TFT active matrix
    Graphics Processor: ATI Mobility Radeon 9700
    Resolution:     1440 x 900 pixels
    Battery
    Battery Type: Lithium ion
    Connectors Interface Provided: S-Video, VGA
    General Product Info
    Input Devices: Keyboard, Touchpad Included
    Sound Card: Sound card
     I'd really like to solve this, and feel like a reason for the crappy results must be close to an explanation after all this. I have to believe that this pc camera should work on the Toshiba laptop.
    Thanks so much,
    Jenrou

  • VPN works on Mac but not on Win7

    Hi,
    I'm trying to connect to the VPN at my workplace. On my Mac laptop it works fine (I'm connected now) but the same login details doesn't work on my Windows 7 desktop. I must be missing something obvious..The error code I get is:
    807 
    The network connection between your computer and the VPN server was interrupted. This can be caused by a problem in the VPN transmission and is commonly the result of internet latency or simply that your VPN server has reached capacity. Please try to reconnect
    to the VPN server. If this problem persists, contact the VPN administrator and analyze quality of network connectivity.
    I appreciate any help.
    Robert

    Hi,
    The type of the VPN connection? A Windows-based VPN server?
    If you have installed some 3 rd party security software (anti-virus, anti-spyware, etc.) on the computers,
    please temporarily disable or remove it and check if it works
    You can also temborarily disbale Windows firewall, check this issue again
    Check with your ISP and ensure that the needed ports are not blocked.
    Yolanda Zhu
    TechNet Community Support

  • I was using webrtc connection for a video connect. Firefox works in Mac but not work in windows

    I was using our company API tokbox SDK to do the servers test between two machines. I blocked one machine ipfw to test the server connection. However, our server connection works well when we are using two mac firefox browser, but not succeed when we were using one windows and one mac machine.

    Oh, I replied in your second question here: https://support.mozilla.org/questions/1001511

  • Workshop App Works on Admin but Not On Managed Server

    Hi all, I have a very simple test Workshop App that works fine on an Admin server
    but not on a Managed Server. I have all the JMS and JDBC resources that the apps
    need, the console does not complain, they deploy fine, but for some reason I get
    exceptions when deployed to the Managed server but works fine on the Admin server.
    What's the difference between both servers? I start one with startWebLogic.cmd
    and the other one with startManageWebLogic.cmd in the same domain directory. The
    only resource that I have not been able to target to the managed server is WSStoreForwardInternalJMSServercgServer
    which I have no idea what it is or if it matters. Some portions of the app works
    when deployed to the managed server so I know it has deployed fine and some simple
    pages compile and work fine but when using certain JAR files in the lib directory
    I get weird exceptions on the managed server and not on the Admin server.
    I'd appreciate any help.
    Thanks, Jose

    Hi all, I have a very simple test Workshop App that works fine on an Admin server
    but not on a Managed Server. I have all the JMS and JDBC resources that the apps
    need, the console does not complain, they deploy fine, but for some reason I get
    exceptions when deployed to the Managed server but works fine on the Admin server.
    What's the difference between both servers? I start one with startWebLogic.cmd
    and the other one with startManageWebLogic.cmd in the same domain directory. The
    only resource that I have not been able to target to the managed server is WSStoreForwardInternalJMSServercgServer
    which I have no idea what it is or if it matters. Some portions of the app works
    when deployed to the managed server so I know it has deployed fine and some simple
    pages compile and work fine but when using certain JAR files in the lib directory
    I get weird exceptions on the managed server and not on the Admin server.
    I'd appreciate any help.
    Thanks, Jose

  • App works when exported, but not in FlashBuilder

    I have an AIR drag-and-drop app that uses NativeDragEvent.NATIVE_DRAG_ENTER
    The app works as intended when I export it for release.   When I run or debug with FlashBuilder the application does not acknowledge files of any type being dragged over it. 
    Again, when the application is installed, it works great.  I'm dragging and dropping without issue.  This only happens when I'm running the app from FlashBuilder.  This isn't a big deal, but it is annyoing.
    Any ideas?

    I suspect this is where my issue lies, but I am not sure how
    to fix it. I have attached some code that defines the image
    location. I am able to successfully retrieve documents with the
    following, is this the same type of scenerio,
    http://www.skytitleagency.com/documents/Land_Contract.doc,
    except in the images folder ?

  • Flash drive works on Mac but not PC

    I got this new flash drive. It's a generic brand. The first thing I did was plugged it into my iMac, saved a few files, and renamed the drive. However, when I plug it into a PC, essentiallly any version of Windows, it won't show up. On Windows XP, it'll try to recognize it when I first put it into the port, then it'll say that it failed to recognize it. After that, it just won't bother with it anymore. On Windows 7 Ultimate, it does nothing. Haven't tried Vista.
    I thought that it was a problem with the Windows OS, so I tried looking for the drive in Disk Management. It just doesn't show up at all, anywhere. Plugging it into a Windows is like doing nothing.
    It works perfectly fine on Mac, it reads, writes, copies, everything. So I reformatted the drive with Disk Utility using FAT32, even partitioned it, all MS-DOS. I actually did this several times and tried plugging it into both the XP and 7, but still nothing happens. I just don't understand what could possibly be wrong with it.
    I saw reviews on it and every single person says they have had no problem with it on their PC. One even said it works just fine between PC and Mac.
    Is mine just defective or is there something I haven't done?

    Your flash drive needs to be formatted to be in FAT32 format. That is the file structure that is compatible with both Windows PC's and Macs. (If you formatted it for a Mac and it's "Journaled" then it will ONLY work on Macs.)
    But to be able to do this, you have to erase the entire Flash drive and start over. So you will need to back up your files somewhere else first.
    Here is a link to eHow that takes you through the steps:
    http://www.ehow.com/how_5929724_format-drive-work-mac-pc.html
    I have had many issues with flash drives being incompatible in Windows 7. You might need to manually upgrade the flash drive's drivers or visit the manufacturer's website for troubleshooting issues with Windows 7. If you formatted the drive to FAT32 already, and it works on the Mac, then this is no long a "Mac issue". Your time would be better spent in the manufacturer's support forums. (or a Windows 7 support forum)

  • Express works for mac but not for pc's

    my airport express works for my mac and iphone, but it won't work with my wife's and friends' pc's. the password works for me, but when they attempt to enter the password their computers ask for a network key instead of the password. please help!

    I had successfully set up my Powerbook and PC to use Airport Express on a closed network. Been working fine for 5 weeks until tonight when neither machine could find the network. I reconnected the Mac but I can't get the PC hooked up again. Any ideas?
    Charles

Maybe you are looking for

  • Datatype for Characteristic IO.

    Hi, I have an ECC field Royalty Percentage which has a value  say 0.80, Am mapping it to Characteristic IO in BW which has a datatype NUMC. Now this means that Ryalty percentage comes up as 0080 instead of 0.80. What data type do I select so that it

  • Direct 2 Different Audio Sources to 2 Different Outputs?

    Hi, I have searched for this but could not find it. I have a 3,1 Mac Pro running 10.6.8. I want to watch and listen to a video file that has it's audio sent to the Line Out where I have powered, desktop speakers. At the same time I would like to hear

  • Using OracleXMLSave for nested date

    I am trying to insert an XML document containing the following date structure into Oracle using the OracleXMLSave class. Is there a way to do this without reformatting the date into a single element beforehand? Here is the stucture. <expiration-date>

  • EEM - Applying QoS

    Hi, I am replacing a 7600 router with an ASR 9K. However, I wasn't able to find the correspondant EEM IOS-XR commands for the below IOS EEM: event manager applet QoS-NIGHT event timer cron cron-entry " 0 16 * * 0-7" action 1.0 cli command "enable" ac

  • Why can't I download Snow Leopard to my MacBook?

    I'm attempting to load Snow Leopard without success. I purchased the CD from the Apple Store and when I place it in the drive the system ejects it and will not load the software.  Any suggestions?