I write a program to play audio file, it use sun.audio.*, but it can play

i write a program to play audio file, it use sun.audio.*, but it can play ,can you tell me what error is it ?
import sun.audio.*;
import java.net.*;
import java.io.*;
import java.io.FileInputStream;
public static void alertAudio(String fileName)
try{
InputStream in = new FileInputStream(fileName);
AudioStream audio = new AudioStream(in);
AudioPlayer.player.start(audio);
catch(Exception e)
System.out.println(e);
public static void main (String argv[])
String fileName = "test.au";
alertAudio(fileName);
System.out.println("close");

help help me

Similar Messages

  • Adobe Audition does not playback any audio file. He opens it but does not react on the play key.

    Adobe Audition CC does not playback any audio file. He opens it but does not react on the play key. It is after use audio hardware usb wi-fi headphone and return to build-it out. The program don't react now.
    I see problem:
    I am unable to get playback at all in CS6 on Mac. The play button or spacebar will not move the playhead or make sound come out of the foamy things with the magnets. The play button toggles back and forth between green and white, but it isn't working. This is true in both multi track and waveform view.
    Anyone have ideas on what the issue could be? Thanks!
    Some Info:
    MacBook Pro 2.2 i7, 16GB RAM, 512GB SSD
    Mac OS 10.8.3
    Audition CS6 5.0.2 Build 5
    and reply:
    Best bet would be to go into Preferences > Audio Hardware, verify your input and output devices are correct, and probably switch your Master Clock to the opposite setting.  If that fails, we can continue troubleshooting.
    I have the same problem as the author writes. But these actions do not help

    Unfortunately I believe that requires purchasing the new version, and I do
    not have budget approval for such a purchase.
    On Tue, Jan 27, 2015 at 11:34 AM, Charles VW <[email protected]>

  • The audio file is not recognized by Logic. Can't import audio files?

    Hi,
    The audio files are on my desktop. Logic 9.1.1 will not recognize them and gives me this message when I try to drag and drop OR Import Audio File OR use Audio Bin.
    As far as I know, I am using wave files (extension .wav). So what could be the problem. Here's a picture of how the files look on my desktop.
    The regular silver and blue iTunes icons look like this when I Get Info:
    The black iTunes icons look like this when I Get Info:
    Importantly, the black iTunes (only 2 out of the 18 audio files) are the ones that actually import. Does it have something to do with the fact that it shows under "More Info > Audio Channels 1" vs. the silver and blue iTunes .wav files (which do NOT have this)?
    Furthermore, here is the process I used to get the audio files in the first place. On my PC, I exported audio files from my Ableton Live project onto a thumbdrive. I copied the audio files from my thumbdrive to my Mac. Maybe this had something to do with it.
    Also, as you can see, under Sharing and Permissions > there is only "read and write" for all names, so it's not a permissions thing.
    Thanks.

    Thanks for your reply.
    +Can you play them as Preview (select in Finder, hit spacebar)?+ No. The black iTunes icons play with no sound and the silver and blue iTunes icons do not even come up in Preview at all.
    +Will iTunes play them?+ Only the black iTunes files (2 out of the 18). When I click on a silver and blue icon'd file, it will not even open in iTunes.
    why on the desktop? it was just a temporary thing. I was not able to pull them into my Audio Bin. I tried what you suggested. I put the files in the Audio Files folder of my project. When I go to open them from within Logic by Import Audio File, they are visible but greyed out. I don't use the desktop except for testing stuff like you do.
    +How was the thumb drive formatted? FAT32 or other DOS-format, or Mac OS Extended (HFS)?
    +the extension is not where apps look to recognize an audio file format, it is the header data. Some audio programs can read RAW audio files, but more about that after your reply to this one.+ It is formatted MS-DOS (FAT 32).
    (*I wrote all this stuff above while I was working and waiting for the PC to write to my thumbdrive again*******finally I got everything to show up.
    I loaded the files again from the thumbdrive. This time they were all in the black iTunes format, and I put them directly in the Audio Files folder like you suggested. After some doing everything works fine. Weird.
    Thanks!

  • Hi, my mac has stopped playing some avi files (that used to work). I can see the video. Does anyone know why and what i can do? My version of quicktime is 7.6.9.

    Hi i have avi files saved in iphoto that i used to be able to play through quicktime. However in the last few weeks i cannot play many of these files. I can see the videos and click on them but nothing happens (i have version 7.6.9 of quicktime). Does anyone know why this has happened and what i can do about this?
    Thanks.

    What do you mean by what audio/video formats are involved? These are all files from several digital cameras.
    As previously stated, AVI is a file container. It is somewhat old and its originator, Microsoft, dropped official support of it over a decade ago. However, it remains popular with PC users since almost any valid audio and/or video compression format can be stuffed to the file which synchronizes the content by interleaving the individual audio and video frames. The compression format is the specific manner in which the audio and video data are encoded as it is placed in the AVI container. You can find the compression format by inspecting the file in the Finder "Info" window, or in the "Inspector" window of the QT player (or other media player) if the file can be opened.
    For instance, one popular compression combination would be to place DivX encoded video and MP3 audio in an AVI file container. However, neither DivX nor MP3 is natively supported by the QT player. (Although iTunes will natively support the MP3 audio.) Therefore, people who wish to play such files in the QT 7 Player would normally install either the DivX component or Perian but not both. Either installation will independently play such files in the QT Player, but if both are installed, the file will usually stop working since these two codecs can create a playback conflict.
    However, the AVI container could just as easily contain DV along with DV audio. In this case, the file should play correctly in QT since this compression format is natively supported by the basic component configuration that comes in every current OS installation. Therefore, if such files suddenly stopped playing, this could be an indication that a component has been moved or deleted or that your system or QT embedded structure has become corrupted.

  • Flash CS6 cant open play SWF files without importing and destroying them, how can I get around this?

    Flash CS6 can't open play SWF files without importing and destroying them, how can I get around this?
    I'm just trying to preview an swf file in flash like I have with all previous versions.

    What if my SWF loads external content from an online server?
    Not only does the current flash player prohibit such activity, it doesn't even pop open an error anymore saying there was an error connecting to an online source.
    Normally, I would simply drag the SWF into Flash and all connections would go through.  I could see traces, errors, and experience no issues.
    Now I can't even do that.  So what then?  You have crippled a fundamental use of the program, but THANK GOD we have that deco brush that nobody asked for.
    And for the record, the nature of my work benefits from not necessarily allowing the Flash Player to connect to online content.  The error it pops up?  That's simply another method of error checking that I require.  Updating the Flash Player options is not an option.
    Why would you even remove this key feature from Flash anyways?  It's been there for years ... has the ratio of people importing SWFs (a rather useless gesture in an increasing OOP world) really outweighed the people using Flash as a testing environment that much?

  • How do I change file format so I keep HD and can play on blu ray player?

    how do I change file format so I keep HD and can play on blu ray player?

    Hi
    Part of it - in my way of doing is
    Roxio Toast™ Pro incl BD-component.
    • Burn short AVCHD - on standard DVDs (20-30 minutes at HD quality) - NEED Blu-Ray player to be viewed
    or BD-burner and disks - for full Blu-Ray Disks (not got to this yet)
    I think that saving as .mpeg4 H.264 and save on USB-memory to be put into PlayStation3 also keep high quality playback.
    Yours Bengt W

  • On my iPhone 4 I can play music through the speaker or headphones, but I can not get audio in phone mode, I can't hear anything nor can anyone hear me! Help. Please.

    On my iPhone 4 I can play music through the speaker or headphones, but I can not get audio in phone mode! I can hear anything through the ear piece or via a headphone. Nor can people hear me when I call. I must be doing something wrong, but what?

    Hello Angela,
    Thank you for the details of the issue you are experiencing with sound on your iPhone.  I recommend the following steps for an issue like this:
    Verify that the volume is set to a level you would normally be able to hear.
    Ensure that there is nothing plugged in to the headset jack or the dock connector.
    If the iPhone is in a protective case, make sure that the speaker port isn't blocked by the case.
    Make sure that the speaker and dock port aren't clogged with debris. If necessary, clean it with a clean, small, dry, soft-bristled brush. Carefully and gently brush away any debris.
    If an audio issue occurs when using a specific application, try testing other applications to see if the issue persists.
    If the iPhone is paired with a Bluetooth headset or car kit:
    Try turning off Bluetooth.
    If you experience difficulties with the Bluetooth feature, followthese troubleshooting steps.
    Restart the iPhone.
    If restarting doesn't fix the issue, ensure that your iPhone is updated to the latest version of iOS.
    If the issue is not resolved after restoring the iPhone software, please contact Apple Support.
    You can find the full article here:
    iPhone: No sound or distorted sound from speaker
    http://support.apple.com/kb/ts5180
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • I have a new sound bar that I plug my phone into through the headphone jack. I also have a bluetooth speaker that I want to play through as well. Is there anyway I can play to both devices at once?

    I have a speaker that I am connecting through my headphone jack but I have a bluetooth speaker in another room that I want to play through as well. Is there anyway I can play to both speakers at once? I saw another post on line that suggested going to the Audio MIDI setup and adding additional output devices. The problem is, I see that on my computer but nothing for my iphone. Can this work? I have also seen things for airplay and of course this is all making my mind fuzzy. Help!

    Sure-glad to help you. You will not lose any data by changing synching to MacBook Pro from imac. You have set up Time Machine, right? that's how you'd do your backup, so I was told, and how I do my backup on my mac.  You should be able to set a password for it. Save it.  Your stuff should be saved there. So if you want to make your MacBook Pro your primary computer,  I suppose,  back up your stuff with Time machine, turn off Time machine on the iMac, turn it on on the new MacBook Pro, select the hard drive in your Time Capsule, enter your password, and do a backup from there. It might work, and it might take a while, but it should go. As for clogging the hard drive, I can't say. Depends how much stuff you have, and the hard drive's capacity.  As for moving syncing from your iMac to your macbook pro, should be the same. Your phone uses iTunes to sync and so that data should be in the cloud. You can move your iTunes Library to your new Macbook pro
    you should be able to sync your phone on your new MacBook Pro. Don't know if you can move the older backups yet-maybe try someone else, anyways,
    This handy article from Apple explains how
    How to move your iTunes library to a new computer - Apple Support''
    don't forget to de-authorize your iMac if you don't want to play purchased stuff there
    and re-authorize your new macBook Pro
    time machine is an application, and should be found in the Applications folder. it is built in to OS X, so there is nothing else to buy. double click on it, get it going, choose the Hard drive in your Time capsule/Airport as your backup Time Machine  and go for it.  You should see a circle with an arrow on the top right hand of your screen (the Desktop), next to the bluetooth icon, and just after the wifi and eject key (looks sorta like a clock face). This will do automatic backups  of your stuff.

  • I backup my iphone on my pc and copy backup file into drive D then i setup new OS on my pc. after that i copy the backup file into itunes backup folder but itunes can't find the backup file to restore my iphone. how can i restore my iphone?

    i backup my iphone on my pc and copy backup file into drive D then i setup new OS on my pc. after that i copy the backup file into itunes backup folder but itunes can't find the backup file to restore my iphone. how can i restore my iphone?

    Don't you just love changes in interfaces?
    I found the answer to my question.
    When you attach a device (iPhone, iPad) to your Mac, in iTunes 12 in appears as a tiny icon in the second "row" of the iTunes display. Click the icon and the familiar iTunes display for the device appears. From there, on the Summary screen, you can see the dates of the backups of the device (iCloud and backup to the computer). You can also use the button to backup to the computer.

  • I cannot open pdf files from one supplier when using Adobe Reader but I can using another Viewer

    I cannot open pdf files from one supplier when using Adobe Reader but I can open it if using Google PDF viewer or another viewer. The Adobe reader gives the error "There was an error opening this document. The file is damaged and could not be repaired" when I try to open the file. The version of Adobe Reader is 10.1.7, however I have tried other versions and they all fail the same way.  I have tested on a number of different PC's in different networks and all fail using Adobe Reader but work using alternate viewer. Also the PC's will open a PDF from any other source.

    Newer Reader versions are more strict than older versions (and other PDF viewers).  If certain minimum requirements are not met, Reader will tell you that the PDF is damaged.  This can happen when a document was created with software that does not adhere to PDF standards, or when the file was damaged during a download or email transmission.
    You should contact the creator of these PDFs.

  • I have just bought four songs from iTunes store using my iMac. I can play the music on my iMac and throughout my Apple TV. However after several restarts and double checks I can't get the four tunes to sync with either my iPhone or my iPad.

    I have just bought four songs from iTunes store using my iMac. I can play the music on my iMac and throughout my Apple TV. However after several restarts and double checks I can't get the four tunes to sync with either my iPhone or my iPad. All the software is up to date.

    do you use the same Apple ID on your iMac, your iPhone and iPad? This is a requirement.

  • HT1595 I have 2 Apple TV's one the oldest works fine the 2nd one refuses to recognise the MacBook Pro its connected to but I can play media from the MacBook on the Apple TV from iTunes, help?

    I have 2 Apple TV's one the oldest works fine the 2nd one refuses to recognise the MacBook Pro its connected to but I can play media from the MacBook on the Apple TV from iTunes, help?

    Sorry, content bought with one Apple ID cannot be merged or transferred to another Apple ID.

  • What do I do if someone is hacking into my Game Center so I can't play clash of clans anymore because only one person can play at one time?

    What do I do if someone is hacking into my Game Center so I can't play clash of clans anymore because only one person can play at one time? I changed the password but soon discovered it didn't help. I want to play Clash of clans but every so often the person comes back on. is there a way for Game Center to log off all the accounts, so the hacker will be gone?
    Please help me with this problem

    Your iPad can be hacked only if it's been jailbroken.  Has it?

  • How do you disable "FILE IN USE" pop-ups so you can actually edit and delete PDFs?!

    Can someone please help me with this query:
    How do you disable "FILE IN USE" pop-ups so you can actually edit and delete PDFs?!
    I continue to have a pop saying that either the file in open somewhere in the serve- which it is not- and I cannot delete a particular pdf or edit it.
    It's incredibly frustrating and in the end I end up having four files with different names because it won't let me edit the original file!!!!

    Hi Amila1,
    Are the pdfs stored on a network location?
    If so is the Preview pane turned ON?
    Please check the doc: http://kb.globalscape.com/KnowledgebaseArticle10862.aspx
    Regards,
    Rave

  • I bought a new computer running Lion 10.7.3 and transferred my applications and files from my old Mac using migration assistant but I can't find/transfer my photos from iPhoto and I can't find my old documents such as previous tax returns.

    I bought a new computer running Lion 10.7.3 and transferred my applications and files from my old Mac using migration assistant but I can't find/transfer my photos from iPhoto and I can't find my old documents such as previous tax returns.

    Look for them on your old computer, when found copy the files to a USB drive and move them to the new computer.

Maybe you are looking for

  • Do you recommend sharing an apple ID with my wife or using my own?

    Currently my wife and I own an Ipad and have one Apple ID which we use for itunes to buy apps and songs and what not and sync to our desktop PC... however I just upgraded through AT&T to our first iphones for each of us... she is getting the free 3gs

  • My K100 doesn't want to go to sleep anymore

    I was wondering if anyone has run into this problem. Up until last week I was able to put my K100 to sleep and come back later, wake it up and continue working. This weekend my PC started acting up, the whole windows toolbar on the bottom froze (I ke

  • Billing document creation without Sales order

    Hi everybody, We need to create a Billing document without reference to Sales order. Is it possible? We would use the BAPI "BAPI_BILLINGDOC_CREATEMULTIPLE". Thank you in advance for your help! Regards, Gianmario

  • Flex Builder MRU

    Does anyone know how to clear old projects from Flex Builder so that I can use the project name again as well as the MRU? Thanks. Mark F

  • Full Screen movies do not work in Firefox

    Hi All, I am having a problem publishing Flash 8 movies full screen. They are fine in Internet Explorer. But Firefox crops the full screen so that you only see a portion of the full screen movie. I am using Firefox 2.0.0.4, as well as version 2.0.0.6