Playing mp4 sound files

I am trying to make my code play a sound when a button is pressed. 
At the moment I am using the play sound file block, but this block only accepts files in a .WAV format. 
I am creating this program for someone who is not great with computers. Their easiest way to record sounds to be played saves them in an MP4 format.
Having to make them convert the files to .WAV would be very difficult and frustraiting for them.
What I am asking is if there is a way to play a MP4 file in labview, or a way to programatically convert a MP4 file into a .WAV file for the play sound file block.
Thanks for your time. 

This might work.
Attachments:
WindowsMedia_Player.vi ‏148 KB

Similar Messages

  • How do i play two sound file one after another

    Hi All,
    How do i play two sound file one after another using single AudioClip Component?.
    Advance in thanks
    Manivel

    AudioClip gives you very little control over what happens to the sound, it also isn't capable of playing long clips or waiting until a clip ends. It will play multiple clips over top of each other.
    To do what you want you should use the facilities of javax.sound. Here's a post with an example: http://forum.java.sun.com/thread.jspa?forumID=513&threadID=450768
    There is also a tutorial, but its example fails for long clips.

  • Help playing a sound file please...

    i am trying to play a sound file everytime a button is clicked. the sound will play the first time the button is clicked but wont play after that. how can i get the sound file to play everytime the button is clicked?? here's how i play the sound file...
    InputStream in = new FileInputStream(sound.wav);
    AudioStream as = new AudioStream(in);
    // in the button action event...
    AudioPlayer.player.start(as);
    i tried adding this line... AudioPlayer.player.stop(as);...before the...AudioPlayer.player.start(as); -- the sound file still only plays once
    any help appreciated...thanks

    Hi there,
    Is there a class AudioPlayer in the API or is it yours. Anyway, your class must implement AudioClip interface. Then call yourClass.play(as); You dont need to stop, each time you call play(), it restarts. Try and let me know.
    cheers

  • How do I "join" an mp4 sound file and a 'photo that I can upload  to YouTube?

    Thanks.

    Drag the photo to your project timeline. Now drag the sound file directly onto the photo thumbnails - a green bar will appear under the thumbnails. You can drag this bar back and forwards to correctly position it.
    Double-click on the photo to open the Inspector and change the duration to the length of your sound file. Finally, drag the end of the sound file to the end of the photo thumbnails, so that the full sound file plays in the project. Change the photo duration again if necessary.
    If you click on the icon to the left of the Project thumbnail slider, the sound file waveforms will appear within the green bar. You can drag fade markers inwards at either end of the waveforms to create a fade in or fade out effect.
    John
    Message was edited by: John Cogdell
    NOTE: I'm assuming that you are using iMovie '11, although similar procedures apply to iMovie '08 and '09 (with the main exception being waveforms).

  • Problem, trying to play many sound files

    hello,
    I did not find a specific answer to my question in most of the archives and so I am posting here.
    my problem is that I have to play a sound when mouse moves over an object and another sound when the same object is clicked.
    there are many such items on the screen and so it is expected that when the mouse entered from the mouse listener is fired, the sound must play.
    but what really happens is that when the mouse moves over the first object the sound plays all right. but there is no sound played when the mouse click happens.
    I have properly loaded the sound files and I am sure that the code is right.
    infact the major thing that has frustrated me is that if I move the mouse on an opject (an icon) the sound is properly played. and if I wait for a long time and then move the mouse on another icon the other sound is played as well. but if I move the mouse quickly from one object to another no sound is played for the second object. or if I click the mouse on an icon after a long holt even the click sound playes.
    what could be the problem. why is it that sound only play when the actions are done after long haults?
    is it an issue of java performance. should I try to do the sound playing stuff in different threads for each icon's mouse events?
    I also tried to stop the file on the mouse exit method to make sure that there is no sound left playing.
    this game is depending a lot on mouse movements with sounds and so I have to get the sounds playing at the same time mouse moves over the objects.
    I use the audioClip to load my sounds with the method in the applet class.
    I really don't know abt the latest java media api and will like to know if that is what I must use for my task or audioClip is ok with me.
    thanks
    Krishnakant.

    I dont know exactly, but I dont know if applets support various files at one time.
    Have your tried to do that with javax.media or with javax.sound.sampled?
    Or could your post the code?
    R. Hollenstein

  • Mail app no longer plays QuickTime sound files.

    Before upgrading to Mountain Lion, I was able to play sound files attached to mail within the app.
    In other words, if someone sent me a sound file, it would appear as a QuickTime sound within the body of the email and I could play it.
    That was a very nice feature.
    Now sound files will not play within the mail window. Instead, I need an external player such as QuickTime Player or iTunes.
    How can I get that feature back?

    What specific sound file types will not play as Mail attachments in Mountain Lion?
    I just sent an .m4r (ringtone), mp3, and .m4a (iTunes aac music) files as Mail attachments. The first appeared as an icon that played via QuickLook from within Mail. The second two appeared as black, QuickTime styled, embedded music play bar attachments. They played back flawlessly.
    Have you installed any application recently that may have hi-jacked the default QuickTime audio playback? It would have done so silently, or popped up a dialog requesting to perform the hi-jack on a list of music file formats.
    You may have to select each particular audio file format in Finder Get Info and restore QuickTime in the Open with section on that panel.

  • How to play wikipedia sound files (Ogg) in Safari 6.0.3?

    I'm pretty sure the answer to this one is that it can't be done, but just in case I've missed something in my web searching. I used to be able to play them under OSX 10.6.8. For instance, these sound files: http://en.wikipedia.org/wiki/Beethoven_symphony_5

    Please link to a page you're having trouble with, if possible.

  • Problem with playing a sound file.

    Hi,
    I simply want to play a sound by a button click. I imported
    <AVFoundation/AVAudioPlayer.h>. The code block is here:
    In .h file:
    #import <UIKit/UIKit.h>
    #import <AVFoundation/AVAudioPlayer.h>
    @interface PlaySoundViewController : UIViewController <AVAudioPlayerDelegate>
    in .m file:
    -(IBAction)btnPlay:(id)sender
        //Get the filename of the sound file:
        NSString *path = [[NSBundle mainBundle] pathForResource:@"REC001" ofType:@"MP3"];
        AVAudioPlayer* thePlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:NULL];//error here as it will compile if I commented it (and two line after) out.
        thePlayer.delegate = self;
        [thePlayer play];   
    Everything looks fine but it failed when I tried to run it. Looks like it cannot find my sound file "REC001.MP3". I put it in folder ".../PlaySound/Resource Files/SoundFiles/REC001.MP3", and "PlaySound" is my project name. However the path returned is ".../PlaySound/REC001.MP3". I guess this is why it cannot find the object. But it didn't work even I put the sound file under "PlaySound" directly. Anyone has a solution?
    Thanks.
    Regards,
    Taizhi

    Hi Mark,
    Thanks for the reply. Based on your instruction, I checked and I can see the sound files in Build Phases. The location is ".../PlaySound/SoundFiles/REC001.MP3". I don't know why it ignores folder "Resource Files". I guess that is the way it is as I also can see other images in different folders which are shown properly in the project.
    The detailed error message is here:
    Ld "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator/PlaySound.app/PlaySound" normal i386
        cd "/Users/greatzhi2001/Desktop/iProjects/PlaySound"
        setenv MACOSX_DEPLOYMENT_TARGET 10.6
        setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr /bin:/usr/bin:/bin:/usr/sbin:/sbin"
        /Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/llvm-gcc-4.2 -arch i386 -isysroot /Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator4.3 .sdk -L/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpx zlqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator -F/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpx zlqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator "-F/Users/greatzhi2001/Desktop/iProjects/PlaySound" -filelist "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Intermediates/PlaySound.build/Debug-iphonesimulator/PlayS ound.build/Objects-normal/i386/PlaySound.LinkFileList" -mmacosx-version-min=10.6 -Xlinker -objc_abi_version -Xlinker 2 -framework UIKit -framework Foundation -framework CoreGraphics -o "/Users/greatzhi2001/Library/Developer/Xcode/DerivedData/PlaySound-anydnuuxbpxz lqfodwbuqqjwjzcd/Build/Products/Debug-iphonesimulator/PlaySound.app/PlaySound"
    Undefined symbols for architecture i386:
      "_OBJC_CLASS_$_AVAudioPlayer", referenced from:
          objc-class-ref in PlaySoundViewController.o
    ld: symbol(s) not found for architecture i386
    collect2: ld returned 1 exit status
    Is the framework AVFoundation I added wrong? Thanks.
    Regards,
    Taizhi

  • Playing local sound file

    I need to play an mp3 file in my AIR app. But I won't
    necessarily know the path to the file because I need to use things
    like the storage directory. So, would I have to do something like
    this to get that done:
    var file:File =
    File.applicationStorageDirectory.resolvePath("path/to/mp3");
    var urlRequest:URLRequest = new URLRequest(file.nativePath);
    and then load the sound from that? Or is there some way that
    AIR has provided to skip the first step?
    Thanks!
    Kyle

    @ paus akid,
    There are two things wrong here.
    One, you should never use a nativePath in place of a URL.
    This happens to work on Windows because the nativePath is
    interpreted as an absolute path. However, on Mac and Linux, a
    nativePath is indistinguishable from a relative URL. Since relative
    URLs are resolved against the application directory (in general),
    you get the app:/ URL scheme. So change:
    var req:URLRequest = new URLRequest(file.nativePath);
    to:
    var req:URLRequest = new URLRequest(file.url);
    The second issue is that you don't initialize your file
    object before using it to resolve a second path. Instead of:
    var file:File = new File();
    file = file.resolvePath(currentRandomSong);
    You should do something like this (using the appropriate
    directory):
    var file:File = File.usersDirectory("path/to/mp3");
    See
    Developing
    cross-platform AIR applications for more information.

  • Please tell me how to automatically play a sound file in a PDF slideshow?Da

    I use PS CS3, LR2, and now I purchased Acrobat 9.1 Pro.  My intent is to create an image based full screen automatic slideshow WITH SOUND.  I have everything working well but I can't figure out how to get the sound file to simply play along with the images.  I do not want the viewer to have to press anything to hear the sounds.  The sound file should simply play along with the image(s).  I would like to be able to time the sound file to the images as well.
    I will appreciate any pointers you may have.
    Thanks...

    To do this reliably the document has to be in the list of the client applications list of trusted documents.  You get this prompt when you attempt to play a sound.  The other way is to actually set the Multimedia Trust (legacy) preference on each client for each type of Player application.  While this might seem a bit of a task it's meant to protect the user.

  • How to play downloaded sound files?

    I 'save as' sound files from a nature recordist's group - usually mp3s- but I cant play them.
    Help? I know this is the place.
    Thanks
    ibook G4, B&W G3, Pismo G3   Mac OS X (10.4)   0S 9.2, Peak Le

    As Duane says, iTunes should play MP3. If you have downloaded to, say, the desktop, iTunes will not automatically play it. But if you double click it, iTunes should automatically open and import the song as long as iTunes has been set as your default player. If that doesn't work, occasionally you need to drag & drop the file into an open iTunes window. If that doesn't work the file is corrupt or isn't MP3 even if the download says it is.
    Have fun!
    Adrian

  • Play multiple sound files in different frames from library in flash

    My assessment task for college is to create a webpage of my work.  So far it runs brilliantly except for this.  I only need this to be working in like 2 days!  Help!
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
    at Carolyns_Media_Portfolio_Scene1_fla::MainTimeline/frame5()
    at flash.display::MovieClip/gotoAndStop()
    Trying to be able to play sound clips from the library with the option to play and stop the sound file. Each sound has its own frame, with stop and play buttons. I can run the first sound file perfectly being able to start and stop it but when trying to play the next sound it creates the above error on output. I have dead buttons as well on the second sound.
    The top buttons take you to each scene
    The script runs from frame 5.
    import flash.events.MouseEvent;
    **buTrivia.addEventListener(MouseEvent.CLICK,clickListener7);
    function clickListener7(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("trivia");
    buToyRA.addEventListener(MouseEvent.CLICK,clickListener8);
    function clickListener8(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("toyminatorRA");
    buCaroline.addEventListener(MouseEvent.CLICK,clickListener9);
    function clickListener9(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("caroline");
    buServerDown.addEventListener(MouseEvent.CLICK,clickListener10);
    function clickListener10(event:MouseEvent):void {
    SoundMixer.stopAll()
    gotoAndStop("serverdown");
    This was the script I found and edited.  Only Trivia works
    stop();
    var triviaSound:trivia = new trivia()
    var triviaChannel:SoundChannel = new SoundChannel();
    buplay1.addEventListener(MouseEvent.CLICK, playSound1);
    buStop1.addEventListener(MouseEvent.CLICK, stopSound1)
    function playSound1(event:MouseEvent):void
    triviaSound.play();
    function stopSound1(event:MouseEvent):void
    SoundMixer.stopAll()
    gotoAndStop("trivia");
    /*buplay2.addEventListener(MouseEvent.CLICK, playSound2);
    bustop2.addEventListener(MouseEvent.CLICK, stopSound2)
    var toysSound:toys = new toys();
    var toysChannel:SoundChannel = new SoundChannel();
    function playSound2(event:MouseEvent):void
    toysSound.play();
    function stopSound2(event:MouseEvent):void
    SoundMixer.stopAll()
    gotoAndStop("toyminatorRA");
    Basically I want to play all the sounds, from the library, individually in different frames using the option to play and stop that sound.  I found the above script but only works for one sound.  I am new at scripting in flash so any help or even a better script option would be awesome.  Thank you

    The 1009 error indicates that one of the objects being targeted by your code is out of scope.  This could mean that the object....
    - is declared but not instantiated
    - doesn't have an instance name (or the instance name is mispelled)
    - does not exist in the frame where that code is trying to talk to it
    - is animated into place but is not assigned instance names in every keyframe for it
    - is one of two or more consecutive keyframes of the same objects with no name assigned in the preceding frame(s).
    If you go into your Publish Settings Flash section and select the option to Permit debugging, your error message should have a line number following the frame number which will help you isolate which object is involved.

  • How can i play a sound file in form 10g

    hi every body ,
    would any one help me with my problem
    *I 'd like to play a soend wave file _ say when press a button _*
    In forms 6i
    it was too easy,
    Read_sound_File('c:\aaa.wav', 'wav', 'emp.sound');
    Go_Item('emp.sound ');
    play_sound('emp.sound');
    But it doesn't work in 10g
    and there is n't read_sound_file in help of 10g
    is there any compatability with this instruction in forms 10g
    or how can i use sound file in 10g
    is it with webUtil ( i' ve configured it correctly )
    *or with java beans _ plz help me with it _*
    Thanks _ waiting for u answers _ plzzzzzzzzzzzzzzzz

         I 'd like to play a soend wave file _ say when press a button package sound;
    import oracle.forms.ui.VButton;
    import java.applet.AudioClip;
    import java.applet.Applet;
    import java.net.URL;
    import oracle.forms.properties.ID;
    public class sound extends VButton
    public final static ID PLAY = ID.registerProperty("PLAY");
    public String sou_loc = "FILE:///C:\EAM_original.wav" ;
    public sound()
    public boolean setProperty(ID p0, Object p1)
    if (p0==PLAY)
    { try
    sou_loc = p1.toString();
    URL sou = new URL(sou_loc);
    AudioClip clip = Applet.newAudioClip(sou);
    clip.play();
    } catch (Exception ex)
    {ex.printStackTrace();}
    return super.setProperty(p0, p1);
    }

  • Playing a sound file more than once in a row?

    OK, so I got the PlayWavFile code from the Internet, and I've modified it a bit so that it has a play method, but I'm trying to get it to play 5 times in a row. The thing is, I can't seem to get a for loop to work around it. Also, since I've never messed with sound before, I'm wondering: What is a line in reference to sound? I don't understand the comments.
    Here is the code I'm trying to execute (Note: I used skype-ringer.wav as an example, but any wav file will do):
    SSCCE Class
    package sscce;
    public class SSCCE
        public static void main(final String args[])
            final PlayWavFile wavFile = new PlayWavFile("skype-ringer.wav");
            for (int p = 0; p < 5; p++)
                wavFile.play();
    PlayWavFile Class
    package flashcards;
    import java.io.File;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.SourceDataLine;
    public class PlayWavFile
        AudioInputStream audioInputStream = null;
        SourceDataLine auline = null;
        AudioFormat format = null;
        DataLine.Info info = null;
        public PlayWavFile(final String soundFileName)
            final File soundFile = new File(soundFileName);
            if(!soundFile.exists())
                System.err.println("Wave file not found: " + soundFile);
                return;
            try
                audioInputStream = AudioSystem.getAudioInputStream(soundFile);
            catch(final Exception e)
                e.printStackTrace();
                return;
            format = audioInputStream.getFormat();
            info = new DataLine.Info(SourceDataLine.class,format);
            // Describe a desired line
        public void play()
            for (int i = 0; i < 5; i++)
                final int EXTERNAL_BUFFER_SIZE = 524288;
                final byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
                int nBytesRead = 0;
                try
                    auline = (SourceDataLine)AudioSystem.getLine(info);
                    auline.open(format); // Opens the line with the specified
                                            // format, causing the line to acquire
                                            // any required system resources and
                                            // become operational.
                catch(final Exception e)
                    e.printStackTrace();
                    return;
                auline.start(); // Allows a line to engage in data I/O
                try
                    while (nBytesRead != -1)
                        nBytesRead = audioInputStream.read(abData,0,abData.length);
                        if(nBytesRead >= 0)
                            auline.write(abData,0,nBytesRead); // Writes audio data
                                                                // to the mixer (an
                                                                // audio device with
                                                                // one or more
                                                                // lines) via this
                                                                // source data line
                    Thread.sleep(1000);
                catch(final Exception e)
                    e.printStackTrace();
                    return;
                finally
                    auline.drain(); // Drains queued data from the line by
                                    // continuing data I/O until the data line's
                                    // internal buffer has been emptied
                    auline.close(); // Closes the line, indicating that any system
                                    // resources in use by the line can be released
    }I've tried putting the for loop around the try block in the PlayWavFile.play method, but nothing works so far. What am I supposed to do if I want the file to play multiple times?

    I don't know if this will help. It's old - I haven't looked at it in at least five years - when I used to use hungarian notation
    What might help is using "m_SourceDataLine.isRunning()" in your for loop.
    private     SourceDataLine      m_SourceDataLine    = null;
    private     boolean             m_bOk;
    private     AudioInputStream    m_AudioInputStream     = null;
    private     int                 m_iBytesRead      = 0;
    private     byte []             m_bytesToWrite;
    if ( AudioSystem.isLineSupported( Port.Info.SPEAKER ) )
        String     strFile     = "SOUND528.WAV";
        File f = new File ( strFile );
        if ( f != null  &&  f.isFile() == true )
            m_AudioInputStream = AudioSystem    .getAudioInputStream    ( f );
            if ( m_AudioInputStream != null )
                //     more than enough to hold the complete file.
                m_bytesToWrite           = new byte[ 10000 ];
                //     Read the file and remember how many bytes were actually read.
                m_iBytesRead          = m_AudioInputStream     .read     ( m_bytesToWrite, 0, m_bytesToWrite.length );
                //     Now that you have read the file find out its format.
                AudioFormat          AF     = m_AudioInputStream     .getFormat     ();
                //     Clips don't allow pre-loading.  You must load it and play it at the same time.
                //DataLine.Info     info     = new DataLine               .Info           ( Clip.class, AF );
                //m_Clip                    = (Clip) AudioSystem     .getLine     ( info );                                   
                //m_Clip     .open          ( AIS );
                //     SourceDataLine's allow you to pre-read and play later.
                DataLine.Info     info     = new DataLine          .Info                ( SourceDataLine.class, AF );
                m_SourceDataLine          = (SourceDataLine)     AudioSystem          .getLine     ( info );
                //     The most important improvement is using open with the buffer size to use.
                //     Otherwise, if the buffer is too small the write function will block until
                //     the requested amount of data is written.  This then delays the video.
                m_SourceDataLine          .open     ( AF, m_iBytesRead );
                m_SourceDataLine          .start     ();
                //m_SourceDataLine     .write     ( m_bytesToWrite, 0, m_iBytesRead );
                //m_SourceDataLine     .isRunning()
    }

  • 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).

Maybe you are looking for

  • No S-Video and composite video cable adapters from Apple?

    Hello. Is it me or does Apple's http://store.apple.com/us/browse/home/shop_mac/mac_accessories/cables/cable_choo ser not carry any video cable adapters that go to S-Video and composite inputs (an old Panasonic projector TV from Y2K) from MacBook Pros

  • Error While Doing Post Goods Issue

    Hi SD Gurus While I am Doing PGI for Standard Order, I am Getting the following Error. Version : 5.0 Clien: 800 Runtime Errors         PXA_NO_FREE_SPACE Date and Time          24.01.2008 23:50:48 Short dump has not been completely stored (too big) Sh

  • Runtime OS command before Message processing

    Hi all, I have a scenario where the input file from a particular FTP server has to be moved to XI server and then process the message from there. For this I am trying to use "Runtime OS command before Message processing" My problem is that how do I d

  • How do you play an album in the correct order?

    Just bought an ATV. 160GB model, software version 2.3. I've synched it to my MacBook's iTunes library, and it plays music fine. However, I can't find a way to simply play an album in the correct sequence. If I navigate to an album and open, the only

  • Flash Log-In

    Hello- I am working on a project for a client... It will be a self-running application on a flash drive. Midway through the project, the client informed me that the application's users must first log-in via their website's log-in system. This would b