How to play the audio file please help me

i would like to play audio files such wav files, au files etc
I would like to know how to play audio file easily in Applet and
applications
Thank you

import sun.audio.*; //import the sun.audio package
import java.io.*;
//** add this into your application code as appropriate
// Open an input stream to the audio file.
InputStream in = new FileInputStream(Filename);
// Create an AudioStream object from the input stream.
AudioStream as = new AudioStream(in);
// Use the static class member "player" from class AudioPlayer to play
// clip.
AudioPlayer.player.start(as);
// Similarly, to stop the audio.
AudioPlayer.player.stop(as);

Similar Messages

  • How to view corrupted word files, please help?

    Can't view doc corrupted file .How to recover unsaved documents WORD? how to view corrupted word files, please help

    It could be Word or even Windows that is having the problem. Before you start trying to restore a backup or repair a file, try opening other documents.
    Try opening your "corrupt" document from another computer. Also you can try to make a copy of corrupted files. (It could work) : http://www.filerepairforum.com/forum/microsoft/microsoft-aa/word/968-i-would-be-grateful-for-any-help-to-repair-or-the-procedures-word-files
    But if nothing helps, you can try to recover it by using DOCX Viewer Tool Download free demo versions of this software from website: http://www.docx.viewertool.com/ It’s
    gonna help.

  • How to play an audio file from the begin.........

    Hello to everybody,
    I am working on a application that is supposed to manage audio file. At the moment I 'm using the SourceDataLine instead of the Clip. But I've got a problem. When the user pushes the Stop button I want that if he pushes Play again the track starts from the begin. I've used the drain() and flush() method but it doesn't work because the track resumes from the point when has been interrupted. Here part of the code:
    @Override
    public void run()
    try
    if(dataline!=null)
    dataline.open(audio_format);
    dataline.start();
    int i=0;
    while((i=audio_input_stream.read(buffer, 0, buffer.length))!=-1 && flag==false)
    if(i>0)
    dataline.write(buffer, 0, i);
    dataline.drain();
    dataline.stop();
    dataline.flush();
    dataline=null;
    dataline.close();
    And also I'd like to know how to navigate through the audio file by a slider or something like that, so how much time is passed.
    Thank you in advance.
    Maurizio Di Vitto

    mauriziodvt wrote:
    I've tried to use it but I found out that if I use quite large wav files an exception is thrown, Aha! I expected as much. That is why I developed BigClip.
    ..so I thought to change to SourceDataLine even if Clip has the right stuff to manage my audio files. So what do you suggest? Is there a way to avoid such problem? I mean, how can I be sure that I'm able to use every wav files? Not every WAV file can be opened using SourceDataLine, but if SDL can open it, so can BigClip.

  • Playing the audio file from the point of mark

    Hi All, i want to play a audio file from the point of mark.
    i have used mark() method to mark but when i play the audio it is still playing the audio from the starting point. please help me.

    Hi,
    Question:
    1. You have a folder for each DVD whose video contents you edited.
    Answer: Yes
    Question:
    You talk about projects 34, 35, 36, 37. Are these projects associated with only one specific DVD?
    What is supposed to be in each project - just edited VTS_01_1.VOB or edits from the others in the series
    such as VTS_01_2.VOB, VTS_01_3.VOB, etc.
    Answer:
    Project 34 has edited Premiere Elements file 34 and the VOB files (VST_01_1.VOB, VTS_01_2.VOB, etc) from DVD#34
    Project 35 has edited Premiere Elements file 35 and the VOB files (VST_01_1.VOB, VTS_01_2.VOB, etc) from DVD#35
    Project 36 has edited Premiere Elements file 36 and the VOB files (VST_01_1.VOB, VTS_01_2.VOB, etc) from DVD#36
    etc.
    Question:
    2. If you screen each DVD video file VOB for a given DVD disc, does the content follow sequentially and cleanly?
    Answer:
    Yes
    When I run the VST_01_1.VOB, VTS_01_2.VOB, etc from each project the audio and the video are clean and match.
    When I run the edited Premiere Elements file that were created after project 34 edited Premiere Elements file project 35, 36, 37 etc. I am getting the audio from project 34
    When I run the edited Premiere Elements file that were created  before project 34 edited Premiere Elements file project 1, 2, all the way to 33. I am getting the correct audio
    Thanks,
    Ron

  • Windows Media Player cannot play the audio files

    Hi, I have Toshiba laptop, it's my baby, and suddenly I cannot play any sounds! When I click to play a song on windows media player it says:
    Windows Media Player cannot play the file because there is a problem with your sound device. There might not be a sound device installed on your computer, it might be in use by another program, or it might not be functioning properly.
    I have tried everything and I'm on my last nerve! Basically, I'm really rubbish with computers, I can't understand this at all, I've followed every path suggested by the 'help' section in my computer and I still can't listen to 'The Feeling!' Please help, I'm going mad here!

    Hello
    I have had similar problem after usage of Windows Live messenger (talk option). The sound was suddenly gone without any reason. I have done follow steps:
    Close all running applications
    Enter start control panel system hardware tab device manager and remove listed sound card
    Start Add Hardware option in control panel.
    The sound card should be detected and installed properly. After doing this try please to use Windows Media player again
    Good luck!

  • How to play .mht audio file

    My professor is presenting her notes in an .mht audio file.  I have downloaded google chrome, firefox to no avail.
    Any suggestions?

    import sun.audio.*; //import the sun.audio package
    import java.io.*;
    //** add this into your application code as appropriate
    // Open an input stream to the audio file.
    InputStream in = new FileInputStream(Filename);
    // Create an AudioStream object from the input stream.
    AudioStream as = new AudioStream(in);
    // Use the static class member "player" from class AudioPlayer to play
    // clip.
    AudioPlayer.player.start(as);
    // Similarly, to stop the audio.
    AudioPlayer.player.stop(as);

  • Actionscript not working on the HTML file PLEASE HELP

    Hello,
          I made a website in flash, you can download everything here, because I need this problem fixed by Monday http://www.mediafire.com/?sharekey=e5d0b30598ff413aa0f2f20c509059d9e04e75f6e8ebb871
         The problem is, when I publish the file, and run the html file, the actionscript doesn't work. When I run the project in flash it works perfectly. I do not believe it is the player or anything of that sort that is wrong, although I can not be sure. I've tried this on like 10 different computers, and none were able to load the actionscript. Does anyone know why the actionscript wouldn't be working when I run the html file for the site?
    Please Help, Thank you.

    Hi !
    Don't panic yet
    I think you didn't select the Flash with SFCommand in the HTML tab inside the Template dropdown menu,  that's the reason your Actions Scripts doesn't work in the html view.
    To access hold down CTRL+SHIFT+F12--->HTML tab--->The first dropdown menu at the top
    Hope this solve your problem.

  • How do i delete files in pages, i have some old invoices in pages that i want to delete, i can delete the text but not the whole file, please help. Dennis

    As it say's above i need to delete some of my oldinvoices/estimates from my files in pages, i can get rid of the text but not the whole file, thanks Dennis

    You locate the file in the Finder(it's in the Documents item of the sidebar by default), drag it to the Trash, and empty the Trash.
    (59926)

  • How to play an audio file when a sprite is clicked

    I am designing a Director movie in order to learn how to use the program. My question is how can I make a small audio file play when the user clicks on a sprite? I believe it is done via a small script. My second question is similar. How can I make the movie play a sound when the cursor hoovers upon a sprite? Can you help, please? Thanks in advance.

    Hi Ibrahim,
    Rob has pointed you to the Lingo for playing a sound. There is a behavior in the Library Palette that makes this very easy without needing to write a script yourself. In the Media > Sound category, there is a 'Play Sound' behavior. You can click and drag this behavior onto a sprite and then in the Parameters dialog, you can choose the sound to play, the channel in which it should play, the event to activate the sound, and if you want the sound to loop.
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.deansdirectortutorials.com/
    http://www.multimediacreative.com.au

  • Ipod doesn't play the songs! please help!!

    when i try to play a song, the title of the song just like sits there but it doesn't play, like the numbers don't go forward, it just sits at 0:00. It isnt frozen because i can change the volume and do everything else. When i click the middle button to toggle from volume to how far into the song i am, if i scroll over a bit to make me further in the song, it just changes to the next one.
    Just now i tried going to the next song or something and whats happening now is every song i have is like popping up on the screen, like its scrolling through all my songs one by one till it got to the end and now its at the main menu.
    Can anyone please help????

    Try resetting your iPod and/or resyncing the files to the iPod. Also below are two articles that may help
    Troubleshooting songs that skip on iPod
    iPod: Troubleshooting songs and audiobooks that won't play

  • How to play an audio file through a button?

    I have a form in which I have a button (Command object). When the user clicks on this command button it is supposed to play a wav file. The wav is residing in my hard disk at "C:\tada.wav"
    I have tried to include the following code in the commandAction() method, which technically is the right way of performing this operation:
    But I get a warning when I compile saying that this operation should be performed in a seperate thread as opposed to commandAction().
    if(c == cmdPlay)
    try     
    String wav = "file:///c:/tada.wav";
    Player p = Manager.createPlayer(wav);
    p.start();
    catch (IOException x)
    x.printStackTrace();
    } catch (MediaException x) {
    x.printStackTrace();
    Can anyone please tell me how to implement this solution properly or just suggest a new way of creating a "play" button in my form? Urgent HELP NEEDED PLEASE!
    THANKS.

    Hi Ibrahim,
    Rob has pointed you to the Lingo for playing a sound. There is a behavior in the Library Palette that makes this very easy without needing to write a script yourself. In the Media > Sound category, there is a 'Play Sound' behavior. You can click and drag this behavior onto a sprite and then in the Parameters dialog, you can choose the sound to play, the channel in which it should play, the event to activate the sound, and if you want the sound to loop.
    Dean
    Director Lecturer / Consultant / Director Enthusiast
    http://www.deansdirectortutorials.com/
    http://www.multimediacreative.com.au

  • How To Edit a .pdf file - Please Help!

    When I Googled the above question, I was told to download the Adobe Acrobat XI.
    I tried downloading the trial version. I was then told to download the Creative Cloud to  be able to download Acrobat XI.
    I downloaded Creative Cloud, then I was taken to the Adobe Applications Manager Page which show a bunch of apps to download.
    I don't  know which app I will need for the editing.  I was looking for Acrobat XI, but it's not showing anywhere.
    I tried downloading Photoshop. This took more than 2 hours. After the download was complete, I tried launching it, but nothing happened.
    I went back & double-checked the instructions, & I'm directed & got stumped at the Applications Manager page once more.
    I find this very frustrating. I wish it were not this complicated.
    I just want to edit a .pdf file, and nothing else. I'm not sure if I want to go through all these maze, or just use FIVVER, pay $5.00 & AVOID all these hassles.@nikoledeon.
    PLEASE HELP!

    Downloads available:
    Suites and Programs:  CC 2014 | CC | CS6 | CS5.5 | CS5 | CS4 | CS3
    Acrobat:  XI, X | 9,8 | 9 standard
    Premiere Elements:  12 | 11, 10 | 9, 8, 7
    Photoshop Elements:  12 | 11, 10 | 9,8,7
    Lightroom:  5.5 (win), 5.5 (mac) | 5.4 (win), 5.4 (mac) | 5 | 4 | 3
    Captivate:  8 | 7 | 6 | 5
    Contribute:  CS5 | CS4, CS3
    Download and installation help for Adobe links
    Download and installation help for Prodesigntools links are listed on most linked pages.  They are critical; especially steps 1, 2 and 3.  If you click a link that does not have those steps listed, open a second window using the Lightroom 3 link to see those 'Important Instructions'.

  • HT5004 i nedd itunes 64 file i don't know what to do with my  iphone4 has all it's data in this computer and i cant sync my iphone now cuz its need the itunes64 file please help me if you can thank you

    hello sir
    my system needs itunes64 file i don't know from where i should get this file cuz my iphone 4 is all the time synced with this computer all the back up are in this computer i dont want to lose it coz i did restore once so i dont have all the data in my phone i have it in itunes please help me with itunes 64
    thank you

    Back up all data to at least two different storage devices, if you haven't already done so. One backup is not enough to be safe. The backups can be made with Time Machine or with a mirroring tool such as "Carbon Copy Cloner." Preferably both.
    Boot into Recovery mode, launch Disk Utility, and erase the startup volume with the default options. This operation will destroy all data on the volume, so you had be better be sure of your backups. Quit Disk Utility and install OS X. When you reboot, you'll be prompted to go through the initial setup process. That’s when you transfer the data from one of your backups.
    Transfer only "Users" and "Settings" – not "Applications" or "Other files." Don't transfer the Guest account, if it was enabled on the old system. Test. If the problem is still there, the cause is external to the machine, or else you're dealing with a bug or a hardware fault.
    If the problem is resolved, reinstall your third-party software cautiously. Self-contained applications that install into the Applications folder by drag-and-drop or download from the App Store are safe. Anything that comes packaged as an installer or that prompts for an administrator password is suspect, and you must test thoroughly after reinstalling each such item to make sure you haven't restored the problem.

  • How to play mp4 audio files as video on my iPod Touch?

    I know you are all thinking that this is a stupid question based on the topic, but I have videos for some reason that are in the form of mp4 audio, but they are video when I play them on my computer. I can open these videos (mp4 audio instead of mp4 video) using Windows Media Player and it's not just audio, there is also video. However, whenever I try to sync it to my iPod, it shows up in my music section instead of videos. If i play the video under music, all I see is the white iTunes background, no video. Is there anyway for me to set these files to be recognized as video and store it under my movies category?
    Thanks.

    First, go into Get Info and change the Media Kind on the Options tab to tell iTunes that this is a video. Next, you need to sync this item from the Video tab on your iPod detail in iTunes (i.e. don't sync it as if it was a Music item). If you sync all video content then this will happen automatically once you change the Media Kind. But if you only sync part of your video library, make sure you include this video in the sync selection.
    If you still have problems, you may need to convert the video for iPod playback, even if it plays fine in iTunes. If that's the case, right-click on the video and you'll see an option to convert for iPod use, which will make a copy (so make sure you know which version to sync to the iPod, or simply delete the original).

  • BI BEANS - Graph - How to change the color .. please help

    Hi Everyone,
    Can anyone please tell me how to change the color of the Graph bars or slices. I mean the color which represents the data.
    For example in a pie chart I want to set specific color for specific slice. Please help.
    Regards
    SRT

    It seems to be the SET_SERIE_COLOR() method added to the FormsGraph revised version, but this latest version is momentarily not available for download.
    I think there is an existant open thread on this. Maybe you could find it using the Forum Search box.
    Francois

Maybe you are looking for

  • Can you log into CC on two computers on the same IP address at the same time?

    Can you log into CC on two computers on the same IP address at the same time? Because i accidentally opened both and was wondering if it will affect my membership or deny me access to CC. Thanks

  • MEGA PC 651 and 1 gig of RAM

    Hi Guys, I have a MEGA 651, cele 2.6 gig and i HAD 1 gig of ram in there... but after doing my usual tasks in XP, it would just reboot! as anyone had this problem? i take out 1 stick of 512 and it runs fine.  I think this may be an over heating probl

  • Issue with OIM AD Trusted Recon

    Hi All, I am using OIM 11g BP05 and Active Directory Connector 11.1.1.5.0 version. While running the Active Directory User Trusted Recon, I am getting below exception in logs: <Dec 17, 2012 12:36:08 PM PST> <Error> <ORACLE.IAM.CONNECTORS.ICFCOMMON.RE

  • Phantom with Outside processing

    Hi all, pls help me. I have an assy with a routing with outside processing but I often need to change to phantom this assy. So this assy result phanto for a BOM and non Phantom for another BOM. I need also to count the time of resources used for phan

  • Reflection, menus, and ActionListeners

    Hi everybody, I was doing some reading in the Java APIs and came across reflection, and it seemed like a good idea for some menus I'm implementing, but I'm not fully sure, so I'd like some advice, please, if anyone would be willing. I have a lot of m