An easy way to play wav files on a java program

Hey. I would like to include a wav file to my program, but so far have not succeeded (Is there a way to do this without using applets)
Please, post me a code that can be used without knowing too much about programming!

Please, post me a code that can be used without knowing too much about programming! Hopefully you can read tutorials.
Read the tutorial on [url http://java.sun.com/docs/books/tutorial/]Sound.

Similar Messages

  • Playing wav file on skype

    Hi PPL,
    Is it possible to play a wav file through a java program and active call on skype or sip based phone plays it to the caller (caller on other side hears it)?
    Any sample code or hints on how to acheive this?
    thanks..
    Edited by: amgandhi on Feb 14, 2010 6:22 PM
    Edited by: amgandhi on Feb 14, 2010 6:36 PM

    amgandhi wrote:
    Is it possible to play a wav file through a java program Yes.
    and active call on skype or sip based phone plays it to the caller (caller on other side hears it)?No idea. That's a question about the capabilities of Skype / SIP based phones...and this forum isn't about either of those things.
    Any sample code or hints on how to acheive this?My "hint" would be to find a Skype / SIP phone forum or support area to further investigate the capabilites of those systems.

  • Is there any way to get .wav files to play on iOS devices?

    Is there any way to get .wav files to play on iOS devices? I know some apps can play .wav however I was looking to have safari load a suitable player as needed, but it shows a audio file with a line across it... and does not play the file. Any workaround? Thanks,
    Fabio

    Hi James,
    That is very helpful, thanks. However, that ends up presenting two other problems...
    Initially, the original .wav file has to be downloaded somewhere, how does one download a file from Safari to the phone and then open the file with the app? Is there any way to configure iOS to always use an app for a particular file type? How does iOS handle file types? Do you know why safari does not allow add-ons? Can I configure another app as the 'default' browser?
    Once again, thanks for pointing this out.
    Best wishes

  • Play WAV files into the .jar

    Hello,
    I'm doing small application Java with Netbeans.
    I need is to play .wav file sounds are incorporated into the jar.
    I do not want to use external libraries or external sound files, etc.. I want to go with my .JAR to the office, home, etc ... just need the JAR to hear the sounds.
    I've created a folder "Sounds" in "src" and in that place I have my sounds. (Project / src / sounds). It's a way to incorporate a JAR file, or am I wrong?? Run independently of the sound files.
    At the time of reproducing the sound I do the following:
    Clip sonido = AudioSystem.getClip();
    File f = new File(getClass().getResource(/Sonidos/alarma.wav).toURI());
    sonido.open(AudioSystem.getAudioInputStream(f));
    sonido.start();
    If I run the program with netbeans, I play sounds, but which only transfer my .JAR to another computer, does not play ...
    Any ideas?
    Thank's.

    I don't understand, before I had done as you have written me, but did not work, but now it works.
    Problem solved. Thank's.
    Posting the code here:
    InputStream path = getClass().getResourceAsStream("/Sonidos/alarma.wav");
    try
    sonido = AudioSystem.getClip();
    sonido.open(AudioSystem.getAudioInputStream(path));
    sonido.start();
    }catch(Exception fail)
    System.out.println(fail);
    Edited by: 892291 on 19-oct-2011 10:37

  • Can my muvo tx fm play WAV fil

    my question is my problem and if it can what ccan i be doing wrong? plz im trying to get a song i really like but it wont show up on my mp3

    well...i used to have an MuVo TX FM, and i know everything about it !! but now it's broken.
    Anyway, it can play mp3, wma and wav files encoded only in a unique way !
    but i don't think it can play wav files except in the recordings folder, but i don't really encourage that you play wav files in it !
    you can convert wav to mp3 by any converter you get, or download, but for faster conversion use the creative mediasource, it's in any cd you get with any creative mp3 player !!!!
    tell me if it works.
    cheer to all !!!!

  • Cmus doesn't play .wav files and pulseaudio isn't working properly

    The first problem I noticed was that Chromium was using about 90% of my CPU while I wasn't connected to the internet. So I deleted Chromium because I couldn't fix the problem any other way. After deleting Chromium the CPU problem was fixed but after checking htop again I noticed this message with -11 being in red:
    (http://pastie.org/4234521)
    I started using cmus and noticed that .wav files aren't playing anymore but I am not sure if that has anything to do with this issue. Cmus played .wav files just fine when I had Chromium however. Also, RAM is steadily increasing at about 700 MB which never happened before. I think maybe the problem with cmus and the RAM increase could be caused by pulseaudio not working properly?
    Also, when I run "pulseaudio" in the terminal I get this message in red:
    $ pulseaudio
    E: [pulseaudio] pid.c: Daemon already running.
    E: [pulseaudio] main.c: pa_pid_file_create() failed.
    Last edited by rg_arc (2012-07-10 23:56:41)

    I have stopped using cmus and I am currently using moc(Music On Console). I found out that for some reason pulseaudio is taking up alot of RAM.
    Here is a picture of what is going on in htop:
    (http://i48.tinypic.com/1217mtk.jpg)

  • Can not play wav file on envy touchsmart

    can not play wav files from my emails on my hp envy touchsmart. have tried to download other apps, but nothing is working. help!

    Hi terrylyn11,
    What media player apps have you tried to use to play these files? Are other music file formats playing ok?
    Please click the thumbs up button to say "Thanks!"
    Clicking "Accept as Solution" on a reply that solves your problem makes it easier for other people to find solutions.
    I am an HP employee.

  • Easy way to unzip zipped files?

    I'm trying to figure out an easy way to unzip zipped files.  I'm using C# in VS 4.5.
    I download this:
    http://dotnetzip.codeplex.com/
    I couldn't get any dlls installed.  I couldn't set any reference to anything.
    I also tried to follow the example here:
    http://www.danderson.me/posts/zipfile-class-system-io-compression-filesystem/
    I can't find anything titled 'System.IO.Compression.dll'.  I set a reference to these two:
    System.IO.Compression.FileSystem
    System.IO.Compression
    That did nothing at all.
    For instance, I think this should work:
    using System;
    using System.IO;
    using System.IO.Compression;
    namespace ConsoleApplication
    class Program
    static void Main(string[] args)
    string startPath = @"c:\example\start";
    string zipPath = @"c:\example\result.zip";
    string extractPath = @"c:\example\extract";
    ZipFile.CreateFromDirectory(startPath, zipPath);
    ZipFile.ExtractToDirectory(zipPath, extractPath);
    However, i keep getting an error message that says 'The name 'ZipFile' does not exist in the current context'.
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    Hi
    Please include the below namespace and try it out.
    System.IO.Compression.FileSystem
    The code would be like this.
    using System;
    using System.IO;
    namespace ConsoleApplication
    class Program
    static void Main(string[] args)
    string startPath = @"c:\example\start";
    string zipPath = @"c:\example\result.zip";
    string extractPath = @"c:\example\extract";
    System.IO.Compression.ZipFile.CreateFromDirectory(startPath, zipPath);
    System.IO.Compression.ZipFile.ExtractToDirectory(zipPath, extractPath);
    Please note that you need to add a DLL reference to the framework assembly
    System.IO.Compression.FileSystem.dll
    Please let me know in case of any questions you may have around this. Thank you. 

  • How to Play .wav files in Safari?

    Hi:
    I need a little help.
    I would like Safari to play wav files instead of downloading those file to my Downloads folder. Can this be done.
    Thanks,
    -AstraPoint

    Greetings,
    I would like Safari to play wav files instead of downloading those file to my Downloads folder.
    Can this be done?
    Maybe. First, what is the URL for a .wav file you're trying to play in Safari? I want to test this before I say whether or not it will work.

  • Is there any easier way to edit imovie files that have been exported as mov file then added to FCE 4?? As every move I make has to be rendered and takes forever??? Also my recording is going out of focus without me touching the camera, why has this happen

    Is there any easier way to edit imovie files that have been exported as mov file then added to FCE 4?? As every move I make has to be rendered and takes forever??? Also my recording is going out of focus without me touching the camera, why has this happened any idea what causes this??
    iMovie '08, Mac OS X (10.5.8), FCE 4

    My daughter has had her Razr for about 9 months now.  About two weeks ago she picked up her phone in the morning on her way to school when she noticed two cracks, both starting at the camera lens. One goes completely to the bottom and the other goes sharply to the side. She has never dropped it and me and my husband went over it with a fine tooth comb. We looked under a magnifying glass and could no find any reason for the glass to crack. Not one ding, scratch or bang. Our daughter really takes good care of her stuff, but we still wanted to make sure before we sent it in for repairs. Well we did and we got a reply from Motorola with a picture of the cracks saying this was customer abuse and that it is not covered under warranty. Even though they did not find any physical damage to back it up. Well I e-mailed them back and told them I did a little research and found pages of people having the same problems. Well I did not hear from them until I received a notice from Fed Ex that they were sending the phone back. NOT FIXED!!! I went to look up why and guess what there is no case open any more for the phone. It has been wiped clean. I put in the RMA # it comes back not found, I put in the ID #, the SN# and all comes back not found. Yet a day earlier all the info was there. I know there is a lot more people like me and all of you, but they just don't want to be bothered so they pay to have it fix, just to have it do it again. Unless they have found the problem and only fixing it on a customer pay only set up. I am furious and will not be recommending this phone to anyone. And to think I was considering this phone for my next up grade! NOT!!!!

  • Error Playing .wav file on RHEL 4 using JMF

    Hi,
    We are using jmf api to play wav files on our application deployed on rhel version 4. But we are receiving the following error
    **"Cannot find a Processor for: myfolder/myAudio.wav" --->
    this exception is comming from javax.media.Manager
    throw new NoProcessorException("Cannot find a Processor for: " + source);"**.
    Any ideas what could be issue with this, am I missing some drivers/processor for wav files? I did a default jmf studio installation.
    Thanks and Regards
    Vikram Pancholi
    Edited by: vpancholi on Sep 8, 2009 8:51 AM

    If we take a look at the supported formats page...
    [http://java.sun.com/javase/technologies/desktop/media/jmf/2.1.1/formats.html]
    And the WAV file is supported by the cross-platform pack, AKA, jmf.jar.
    If you're unable to open a WAV file, I'd say it's most likely because you don't have JMF.jar on your library path. You can fix that at runtime with the switch -djava.library.path=<whatever>
    That's what I would say the issue is.

  • Easy Way to Play Clips in Sequence?

    Noob question:
    Is there an easy way to play my clips in sequence without dragging each into the timeline?
    When I log and capture, FCP7 creates a separate clip each time I restart recording.  Can I look at each clip one after the other without double clicking on it and playing each in the viewer?  I've done a brief search of this forum and the manual without finding anything.

    Sure...use another editing app.  FCX allows for clip scrubbing.  Prelude, part of Adobe CS6, does too.
    But FCP, and most other editing apps, require that you load clips into the VIEWER to watch them.  Or, you can grab them all, drag them into the sequence to make a quick "stringout" of all your clips for viewing. 
    This is basic editing...load the clips into the Viewer to watch them.  But Apple has changed that by allowing clip scrubbing in FCX.  So if you want that, you should take a look at that app.

  • Is there any way to play all files in a directory by one url?

    Hi all,
    I am testing fms this days, I have put all my files(such as 1.mp3,2.mp3...n.mp3) in my directory.
    I can play single file fine with url like this:
    rtmp://localhost/mp3/mp3:x/2
    but i want to know is there any way to play all files in my direcotry?
    for example, user click the play button, the player(smp) automatic plays all files in the directory, link windows media server.
    Should I use playlist? Or there is another better way?
    Thanks a lot.

    Hi,
    FMS do not directly take a directory to play files, the file names have to be fetched some way (through script if needed) to make a playlist and then the play command needs to be repeated as many times.
    Thank you !

  • How to play .wav files

    hi all..
    can i play '.wav' files using other than the AudioClip method?
    how ever i have tried to use the method as below but it still isn't working..please help me out...thanks

    I had same problem,wouldn,t play waves convert to .au using goldwave(freeware... www.goldwave.com)then it will play
    p.

  • 6233 not playing .wav files

    i've purchased new 6233 and the firmware is 4.52 but its not playing .wav files, whereas one of my friend has the same phone with 3.70 firmware and its playing without n e problem.
    n solutions about this.

    Hello.
    Only Series 60,80 and 90 phones running Symbian operating system are capable of playing WAV files. From what I know, Series 40 phones do not display this ability and will not be supported still in future revisions of the said platform.
    Cheers.
    The world might be a better place if you were I.

Maybe you are looking for