Raed sound file problem

Hi when I use Sound File Read Simple function to read a wav file I get the following message and it carshes LabVIEW :
Exception: Access violation (0xC0000005) at EIP=0x74AD464C 
I can playback the file without any problem in Media player
Could you please let help me on this . 
Thanks

Hi Tintin_99,
It is hard to tell what may be causing the error simply from the crash report error. Would it be possible to show us your code which you are using to open and read the sound file?
Also, how big is this sound file?
Kind Regards,
Laurence C.
Senior Test Development Engineer
Dyson Ltd

Similar Messages

  • Captivate 8 responsive design sound file problem

    I have imported a wav file into a Captivate lesson slide that is now overriding the narrative on every other slide in the lesson. When I delete the sound file, it still plays. How do I get rid of sound that I don't want? How do I prevent this kind of problem from happening again?
    Thanks in advance for your help.

    Hi
    I hope you have upgraded to the latest captivate version 8.0.1.242. If not please follow the steps mentioned on this post Adobe Captivate Help | Adobe Captivate 8 patch. Make sure to remove layouts and preferences as mentioned in the link.
    There is an issue with text in case of multi-hierarchal bullets but apart from that other things should work fine. You might just have to change some position parameters to fix the results. Can you please share the project, so that I can reproduce the issues at my end. My email address is [email protected] . You can send it via email or drop box.
    Captivate responsive output works for multiple browsers. Please check the link Tech Specs - eLearning, mobile learning & Training Software | Adobe Captivate 8 for details.
    Regards
    Tamish

  • Sound file problem

    Hello,
    I am using sound control in oracle forms 6i. So when I play the file Sound file it is not being played more than 3 min.

    Hi Tintin_99,
    It is hard to tell what may be causing the error simply from the crash report error. Would it be possible to show us your code which you are using to open and read the sound file?
    Also, how big is this sound file?
    Kind Regards,
    Laurence C.
    Senior Test Development Engineer
    Dyson Ltd

  • 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

  • Problems Embedding Sound Files

    I recently upgraded from Acrobat Pro 8 to X, not realizing how different they are. In 8, I would open a link to a sound file and then click on the box that allowed me to embed it in the document. I could have the field borders invisible so that when the hand passed over a text that was linked to sound, it changed to the pointing finger and clicking started the sound.
    Now it seems I can't do that any longer. I watched the tutorial and it looks like I have to have something that's visible. While I know that you can set it so the sound file marker won't print, it's still ugly and carries no identification, unless I add a text field and then have others who use the file learn to exclude both the "comment" and the image of the sound file.
    What I would like to do at the minimum is to be able to type in an identifier for the sound file which is part of the image itself, or else make the image of the sound file transparent, so that the relevant text already present would show through, like it did in Acrobat 8.
    Does anyone know if this is possible any longer? I miss the old way.
    Thanks in advance for your help.

    I've run into similar problems and haven't found a satisfactory solution with sound files. Others have reported this problem as well.
    You might experiment in turning sound files into movies, and making your text label into the first frame of the movie (the "movie poster"). The best movie formats for Acrobat 9 and Acrobat X are Flash formats—F4V and FLV. If you have a copy of InDesign CS5, it's easier to use the Media panel to place and manipulate the Flash movies.

  • Using iDVD, I've no problem creating a slideshow, but I want to add three seperate sound files, in this case speeches I've got in iTunes. I want to create three individual buttons/sub menu to access them individually from the photos. Can anyone help

    Using iDVD I've no problem creating a slideshow, but am having problems trying to add three seperate sound files in this case three speeches that I hold in iTunes. I want to be able to access them individually and seperately from the photo slideshow. Can anyone advise if this can be done and if it can, how I go about creating the seperate menu and buttons.

    If you'd like to integrate the speeches with the slideshow, I'd do that in iMovie where you'll have more control over the timing.  Use chapter markers at the beginning of each speech so the viewer can jump to a particular speech (note that chapter markers advance the viewer to a particular spot -- the viewer keeps watching the rest of the video until the end of everything or until they use the remote's menu button).
    If you're just wanting the speeches to be on the DVD so people can listen to the speeches after seeing your slideshow, you could:
    - use iDVD or iMovie to make a "slideshow" with just 1 image matching the length of a speech.
    - create three submenus and use the speeches as menu music.  Here's a (random) video on creating submenus:
    http://www.youtube.com/watch?v=DlhQSb_D5kc
    John

  • Mountain Lion problem with CAF sound files

    I have various sound files in a Cocoa game under OSX with OpenAL and now with Mountain Lion all the small CAF files (5kb or less) do not play.  Al the other larger CAF files play as normal.  All the files load with no errors.
    Does anyone have any thoughts on what might be causing this?  Anyone else seen problems with sound files?

    This is how it looks like for me. This accours on every Boot Up.

  • Problems with sound VIs - can't create usable new sound file

    hello all!
    I'm trying to create a VI that will, in real time, take a sound file and place it, on demand, as many times as you want into a longer sound file.  it should place the file once each time a button is pressed.  The rest of the audio I want to be just silence, but still filling time so that the output file is in real time.
    (i am a sound editor for TV shows, and for my master's thesis i'm trying to create this program so that I could say, watch a video clip of someone walking and at the same time place footstep sounds in real time while watching the clip, just by pressing a button each time i see a footfall.)
    i attached the VI i have so far.  the only subVIs are in the Sound VI palette (no custom subVIs are used).  No external hardware is used, so you should be able to see exactly what i see.  i would attach the WAV file, but it's not an allowed attachment.  You should be able to use any WAV, stereo 16-bit, 44.1 kHz file.
    the problem i'm having so far:
    the resulting WAV file is not playable by any means I can figure out.  and it's always 4 KB.  So obviously I'm missing something - maybe misuse of the Sound VIs?  (Though the VI does recognize that I'm feeding it a stereo, 44.1kHz, 16-bit file.  so that's good.)
    i'm working on a Mac Powerbook G4, Labview 8.2, 1.5 GHz, Mac OS 10.4.8, 1 GB RAM.  and i've tried both the
    internal sound card and an external sound card (Digidesign's MBox which works with
    ProTools).
    thanks so much for your help!!
    --Liz F.
    Attachments:
    prototypeA.vi ‏31 KB

    Is a printer connected? Is it turned ON? Is the driver up to date?
    Illustrator checks this every time and also writes information on the printer into the file.

  • 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

  • Problem with loading a sound file

    Hello, I am trying to play a sound file (located in same dir as the class files) from a swing app using this line.
    AudioClip clip = Applet.newAudioClip(new URL("sound.au"));When I run the program, I always get a MalformedURL Exception.
    Could someone please tell me the correct way to load a sound file in swing.
    Thanks

    "sound.au" is no valid URL, hence the exception.
    How about "file:///c/myfiles/sound.au" or something?

  • Error while playing sound file in Applet

    Hi!!
    I am trying to play sound file in the applet which produces sound continuously, when it goes above certain set value. When i run the sound file individually it runs perfectly fine but when i try to call that class in diff. program its giving me some security error..i am trying to solve this problem from last so many days..i dont know whether i have to make some change in Security file policy or java policy..the error is like..
    java.security.AccessControlException: access denied (java.util.PropertyPermissio
    n user.dir read)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:269)
    at java.security.AccessController.checkPermission(AccessController.java:
    401)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:524)
    at java.lang.SecurityManager.checkPropertyAccess(SecurityManager.java:12
    76)
    at java.lang.System.getProperty(System.java:573)
    at SoundApplication.startLoadingSounds(SoundApplication.java:52)
    at SoundApplication.<init>(SoundApplication.java:42)
    at TempSet.actionPerformed(TempSet.java:103)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    Please suggest some solution for this..its kinda urgent..
    Thanks in advance.
    Regards,
    Amish

    Are you loading your Applet from a webserver? You could make the sound file available through the same webserver.
    Alternatively, you could package the sound with the code in a JAR. It does mean a bigger download for your Applet users though, but the Applet would be able to access the file quickly.
    If you put your file in the JAR, say in /sound/myfile.ext , then you can get access to it from your code like this:
    URL soundURL = getClass().getResource( " /sound/myfile.ext" );

  • Windows 7 64 bit Sound Card Problem

    In January 2009, we had a 64 bit operating system problem http://forums.adobe.com/message/1015026#1015026. Our software, which was published using Version 6.5, was freezing on a customer’s computer on playing the first sound file, then if the sound file was by-passed, on displaying the first swf. The problem was eventually resolved by Mike Baker publishing our a6p file in Authorware 7, and this cured the fault. So we upgraded to Authorware 7.02 and since then no further problems ... until December 2010.
    We launched our Italian Course late November and had a not dissimilar sort of problem reported by a customer. He's tried uninstalling & re-installing the software but the fault keeps re-occurring. The computer displays a "not responding" message. Debugging, we discovered that the message appears when trying to play the initial mp3 file (fixed bit rate) … the program does eventually continue but without playing the sound file. It then keeps hanging (there are thousands of sound files in our course), and none of the sound files play: text & pictures are displaying normally. Eventually the program freezes and has to be killed with ctrl+alt+delete.
    The computer in question is a Dell Inspiron 580s, & the operating system Windows 7 Home Premium 64 bit. I’m awaiting details of the sound card & confirmation that his drivers are up-to-date but I presume they will be (Windows 7 default is to keep drivers updated). I haven’t got the customer to carry out basic tests sound file tests yet, but he indicates no problems with Media Player or with iTunes.
    Extras in our XTRAS folder include:-
    AWMP3.X32
    MIX32.X32
    MIXVIEW.X32
    NETFILE.X32
    SWADCMPR.X32
    VIEWSVC.X32
    INETURL.X32
    FLASHASSET/FLASHAST.X32
    The database for our Italian course is now in ProgramData. (previous courses, database was in Program Files and run in XP compatible mode). We’re having problems with this location with Windows 7 64 bit … it is maintaining a copy in Virtual Store and updating the file there. No such problem with XP, Vista or Windows 7 32 bit. I see this as an unrelated problem. We got the customer to run the software in XP mode but the problem was not corrected.
    We do have customers successfully running our software on Windows 7 64 bit operating system computers; we had a minor ODBC glitch reported recently from a 64 bit user.
    Any suggestions would be appreciated.

    Tom,
    I concur with Steve that this is probably system-specific. A couple of things you may want to try:
    1. Be sure you're using the Xtras that came with Authorware 7.02 and not 6.5. For example, I believe mixview.x32 and viewsvc.x32 were updated in Authorware 7.
    2. Try making a little AW program with 4 or 5 buttons that each trigger an imported MP3 file, where each audio file has different output settings (e.g. mono vs stereo, 64kbps vs. 92 kbps, etc.). Package it up and send it to the Dell user to test it. You may stumble upon an audio output setting that works on that particular machine.
    Steve Gannon
    GanTek Multimedia

  • How do you open/play a .wav file (music file) without play sound file .vi

    I am having big problems to create a music background for my project. I am newbie using labview and maybe my questions is not so dificult to solve (I hope so)
    I was using play sound file vi but the problem is that I dont want the music file start automatically. I wanna control the start time using a button. I tried include a sound output stop but when the app start and I add more wav files in my vi, the sound file start, then stop abruptally because the stop vi and the everything is normal. I would like to eliminate that error.
    Someone have any idea, maybe using open file or another way. 
    Thanks in advance
    I add a screenshot of my vi and also the vi in this post
    Attachments:
    test sound.vi ‏11 KB

    I leave an example that can provide, use it in your program
    Atom
    Certified LabVIEW Associate Developer
    Attachments:
    playsound.zip ‏58 KB

  • How to input sound file into MS Access Database, not random folder?

    Hi, I am trying to input a sound file into an MS Access 2000 database, I know it can be copied and pasted into there, but how can u input into the database with a user record, i also need the code to extract it as well as inputting it....at the moment it records the sound and stores it as test.wav on the local drive....
    here is my code for my applet do far....
    compile this file first....
    import java.applet.*;
    import java.awt.*;
    import java.awt.event.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import java.io.IOException;
    import java.io.File;
    import java.net.URL;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.TargetDataLine;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.AudioFileFormat;
    public class VoicePasswordRecorder extends Thread {
         private TargetDataLine m_line;
         private AudioFileFormat.Type m_targetType;
         private AudioInputStream m_audioInputStream;
         private File m_outputFile;
         public VoicePasswordRecorder(TargetDataLine line,
                             AudioFileFormat.Type targetType,
                             File file)
              m_line = line;
              m_audioInputStream = new AudioInputStream(line);
              m_targetType = targetType;
              m_outputFile = file;
         /** Starts the recording.
             (i) The line is started,
              (ii) The thread is started,
         public void start()
              /* Starting the TargetDataLine. It tells the line that
                 data needs to be read from it. If this method isn't
                 called then it won't be able to read data from the line.
              m_line.start();
              /* Starting the thread. This call results in the
                 method 'run()'being called. There, the
                 data is actually read from the line.
              super.start();
         /** Stops the recording.
             Note that stopping the thread is not necessary. Once
             no more data can be read from the TargetDataLine, no more data
             can be read from the AudioInputStream. The method 'AudioSystem.write()'
             (called in 'run()' returns. Returning from 'AudioSystem.write()'
             is followed by returning from 'run()', and then the thread
             stops automatically.
         public void stopRecording()
              m_line.stop();
              m_line.close();
         /** Main working method.
             'AudioSystem.write()' is called.
              Internally, it works like this: AudioSystem.write()
             contains a loop that is trying to read from the passed
             AudioInputStream. Since there is a special AudioInputStream
             that gets data from a TargetDataLine, reading from the
             AudioInputStream leads to reading from the TargetDataLine. The
             data read this way is then written to the passed File. Before
             writing of audio data starts, a header is written according
             to the desired audio file type. Reading continues until no
             more data can be read from the AudioInputStream. In this case,
             it happens if no more data can be read from the TargetDataLine.
             This happens if the TargetDataLine is stopped. Then,
             the file is closed and 'AudioSystem.write()' returns.
         public void run()
                   try
                        AudioSystem.write(
                             m_audioInputStream,
                             m_targetType,
                             m_outputFile);
                   catch (IOException e)
                        e.printStackTrace();
         public static void main(String[] args)
              if (args.length != 1 || args[0].equals("-h"))
                   printUsageAndExit();
              /* There is only one command line argument.
                 This is taken as the filename of the soundfile
                 to store to.
              String     strFilename = args[0];
              File     outputFile = new File(strFilename);
              /* For simplicity, the audio data format used for recording
                 is hardcoded here. The PCM 44.1 kHz, 16 bit signed,
                 stereo was used.
              AudioFormat     audioFormat = new AudioFormat(
                   AudioFormat.Encoding.PCM_SIGNED,
                   44100.0F, 16, 2, 4, 44100.0F, false);
              /* Here, the TargetDataLine is being received. The
                 TargetDataLine is used later to read audio data from it.
                 If requesting the line was successful, it will open it.
              DataLine.Info     info = new DataLine.Info(TargetDataLine.class, audioFormat);
              TargetDataLine     targetDataLine = null;
              try
                   targetDataLine = (TargetDataLine) AudioSystem.getLine(info);
                   targetDataLine.open(audioFormat);
              catch (LineUnavailableException e)
                   out("unable to get a recording line");
                   e.printStackTrace();
                   System.exit(1);
              AudioFileFormat.Type     targetType = AudioFileFormat.Type.WAVE;
              /* The creation of the VoicePasswordRecorder object.
                 It contains the logic of starting and stopping the
                 recording, reading audio data from the TargetDataLine
                 and writing the data to a file.
              VoicePasswordRecorder     recorder = new VoicePasswordRecorder(
                   targetDataLine,
                   targetType,
                   outputFile);
              /* It is waiting for the user to press ENTER to
                 start the recording.
              out("Press ENTER to start the recording.\n");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually started.
              recorder.start();
              out("Recording...\n");
              /* It is waiting for the user to press ENTER,
                 this time to signal that the recording should be stopped.
              out("Press ENTER to stop the recording.\n");
              try
                   System.in.read();
              catch (IOException e)
                   e.printStackTrace();
              /* Here, the recording is actually stopped.
              recorder.stopRecording();
              out("Recording stopped.\n");
         private static void printUsageAndExit()
              out("VoicePasswordRecorder: usage:");
              out("\tjava VoicePasswordRecorder -h");
              out("\tjava VoicePasswordRecorder <audiofile>");
              System.exit(0);
         private static void out(String strMessage)
              System.out.println(strMessage);
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import java.io.*;
    import javax.sound.sampled.*;
    import javax.swing.*;
    public class AppletTest extends JApplet
        implements ActionListener
        public AppletTest()
            comp = null;
            startrecording = null;
            stoprecording = null;
            recorder = null;
        public void init()
            Panel panel = new Panel(new FlowLayout(1));
            comp = new JTextArea(50, 50);
            comp.setPreferredSize(new Dimension(50, 50));
            comp.setEditable(false);
            JButton startrecording = new JButton("Start");
            JButton stoprecording = new JButton("Stop");
            comp.append("Please record your Voice Password...\n");
            GridBagLayout gridbag = new GridBagLayout();
            GridBagConstraints c = new GridBagConstraints();
            getContentPane().setLayout(gridbag);
            c.weightx = 1.0D;
            c.weighty = 1.0D;
            gridbag.setConstraints(comp, c);
            gridbag.setConstraints(panel, c);
            getContentPane().add(comp, c);
            getContentPane().add(panel, c);
            c.weightx = 0.0D;
            c.weighty = 0.0D;
            startrecording.setEnabled(true);
            stoprecording.setEnabled(true);
            startrecording.addActionListener(this);
            gridbag.setConstraints(startrecording, c);
            getContentPane().add(startrecording, c);
            stoprecording.addActionListener(this);
            gridbag.setConstraints(stoprecording, c);
            getContentPane().add(stoprecording, c);
            int width = 300;
            int height = 200;
            setSize(width, height);
            setVisible(true);
            boolean looping = false;
        public void actionPerformed(ActionEvent ae)
            if(ae.getActionCommand().equals("Start"))
                createRecorder();
                recorder.start();
                System.out.println("Start Button Clicked");
            } else
            if(ae.getActionCommand().equals("Stop"))
                recorder.stopRecording();
                System.out.println("Stop Button Clicked");
        private void createRecorder()
            String strFilename = "C:\test.wav";
            File outputFile = new File(strFilename);
            AudioFormat audioFormat = new AudioFormat(javax.sound.sampled.AudioFormat.Encoding.PCM_SIGNED, 44100F, 16, 2, 4, 44100F, false);
            javax.sound.sampled.DataLine.Info info = new javax.sound.sampled.DataLine.Info(javax.sound.sampled.TargetDataLine.class, audioFormat);
            TargetDataLine targetDataLine = null;
            try
                targetDataLine = (TargetDataLine)AudioSystem.getLine(info);
                targetDataLine.open(audioFormat);
            catch(LineUnavailableException e)
                comp.append("unable to get a recording line\n");
                e.printStackTrace();
                System.exit(1);
            javax.sound.sampled.AudioFileFormat.Type targetType = javax.sound.sampled.AudioFileFormat.Type.WAVE;
            recorder = new SimpleAudioRecorder(targetDataLine, targetType, outputFile);
            comp.append("Press ENTER to start the recording.\n");
            try
                System.in.read();
            catch(IOException e)
                e.printStackTrace();
            comp.append("Recording...\n");
            comp.append("Press ENTER to stop the recording.\n");
            try
                System.in.read();
            catch(IOException e)
                e.printStackTrace();
            comp.append("Recording stopped.\n");
        private JTextArea comp;
        private JButton startrecording;
        private JButton stoprecording;
        private SimpleAudioRecorder recorder;
    }I intend to use this for verifying the username, password and a voice password over the web....as shown in the following code...
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <meta http-equiv="Content-Language" content="en-us">
    <title>Home Page</title>
    <meta name="GENERATOR" content="Microsoft FrontPage 5.0">
    <meta name="ProgId" content="FrontPage.Editor.Document">
    <meta name="Microsoft Theme" content="artsy 011, default">
    <meta name="Microsoft Border" content="tl, default">
    </head>
    <body background="arttilea.jpg" bgcolor="#000000" text="#FFFFCC" link="#FF9900" vlink="#999900" alink="#669933">
    <!--mstheme--><font face="Arial, Helvetica">
          <p align="left"><font size="4" color="#FFFFFF">Please enter login
          details below:</font></p>
    <form>
    <!--mstheme--></font><table border=0 cellpadding=3 cellspacing=3>
    <tr>
        <td align=right width="74"><!--mstheme--><font face="Arial, Helvetica">
          <p align="left"><font face="Arial, Helvetica, sans-serif"><b><i>Username</i></b></font></p>
        <!--mstheme--></font></td>
        <td width="335"><!--mstheme--><font face="Arial, Helvetica">
          <p align="left"><input type=text
          name=username size="20"></p>
        <!--mstheme--></font></td>
    </tr>
    <tr>
        <td align=right width="74"><!--mstheme--><font face="Arial, Helvetica">
          <p align="left"><font face="Arial, Helvetica, sans-serif"><b><i>Password</i></b></font></p>
        <!--mstheme--></font></td>
        <td width="335"><!--mstheme--><font face="Arial, Helvetica">
          <p align="left">
            <input
            type=password name=password size="20"></p>
          <!--mstheme--></font></td>
      </tr>
      <tr>
        <td align=center width="74"><!--mstheme--><font face="Arial, Helvetica">
          <p align="left"><font face="Arial, Helvetica, sans-serif"><b><i>Voice
          Password Check</i></b></font></p>
        <!--mstheme--></font></td>
        <td width="335"><!--mstheme--><font face="Arial, Helvetica">
           <p align="left">
    <APPLET CODE="AppletTest.class" ALIGN="MIDDLE" WIDTH=272 HEIGHT=38 NAME="AppletTest.class"></APPLET> </p>
        <!--mstheme--></font></td>
      </tr>
    <tr>
        <td colspan=2 align=center><!--mstheme--><font face="Arial, Helvetica">
        <p align="left"><font face="Arial Narrow"><input type=submit value="Enter Website" name="Submit"></font></p>
        <!--mstheme--></font></td>
    </tr>
    </table><!--mstheme--><font face="Arial, Helvetica">
    </form>
          <p align="left">This page was last updated on <!--webbot bot="Timestamp" s-type="EDITED" s-format="%d/%m/%y" startspan -->25/03/04<!--webbot bot="Timestamp" endspan i-checksum="12776" -->.</p>
    <!--mstheme--></font></body>
    </html>I will be very grateful if somebody could help me out....as this is my first time at java programming ....also my first time for using this forum!
    Thanks,
    Regards,
    Mayur Patel

    Hi
    I Learned how to read a file text and Parse as StringTokenizer. But still i don't know how to read the Individual tokens into to database.
    But now i face a new Problem, i am not able to sort it out.
    i am posting my code
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.BufferedReader;
    import java.io.PrintWriter;
    import java.io.IOException;
    import java.io.*;
    import java.util.*;
    public class CSVExample {
        public static void main(String[] args) throws IOException {
            BufferedReader inputStream = null;
            PrintWriter outputStream = null;
            try {
                inputStream = new BufferedReader(new FileReader("file.csv"));
              String text;
                 while((text=inputStream.readLine())!= null)
                    StringTokenizer st = new StringTokenizer(text);
                         if(st.hasMoreTokens())
                        System.out.println(st.nextToken());
            } finally {
                if (inputStream != null) {
                    inputStream.close();
    }Here the Problem is The file.csv has got two fields ID, NAME The content of this file is as follows
    T12,MR.RAJ KUMAR
    T13,MR.EARNEST DIES
    T14,MR.MATHEW HYDEN
    Now when i StringTokenize this File The Output printed as follows
    T12,MR.RAJ
    T13,MR.EARNEST
    T14,MR.MATHEW
    That means when it finds the Space it is not printing the Remaining Text.
    Please Help me in this and then Tell me how to INSER The Tokens into the Database Table
    Thank you for your service
    Cheers
    Jofin

  • Need to play and stop sound file with 1 ms resolution

    Hi,
    I'm trying to open a .wav file then later play it at a time when another parallel loop activates a boolean local variable which controls playback in my "sound" loop. I need high time resolution in stopping the playing of the .wav file, ~1ms. From what I've gathered, I can't use the "sound output write.vi" because it locks the loop until it finishes outputting a set number of samples. Because of this, "sound output stop.vi" has to wait until the next iteration, which is more than ~1 ms.
    In the help menu of the Sound Ouput VIs it says you can set the task ID for the "sound output start.vi" using the "sound output configure.vi." Unfortunately I've only been able to use the "sound output start.vi" following "play sound file.vi", and I don't really know why this is the case.
    I can't start my sound with the "play sound file.vi" because it locks the loop its in until it finishes playing the sound. Oddly this only happens when there is a parallel loop running, if I run it by itself, with no other loops, it doesn't lock the loop. I thought it might have something to do with the local variable, but the loop doesn't lock when the loop restarts the sound using the "sound output start.vi." 
    After opening a .wav file, can i use the "sound output configure.vi" to create a task ID for the "sound output start.vi" to work? Or do I have to use the "sound output write.vi" after calling the "sound output configure.vi." The help menu makes it seem like the prior suggestion is possible.
    Thanks a lot!

    Since it sounds like the problem you're running into is getting the data loaded from the file before you're ready to play it, look at the Files sub-palette, specifically the Sound File Read Simple VI.  You can use this VI to load the data into a waveform and have it ready for use later in the program.
    So in your overall program, read the file with Sound File Read Simple and configure the output with Sound Output Configure and call Sound Output Write when you're ready to play the waveform.
    Alex Person
    NI-RIO Product Support Engineer
    National Instruments

Maybe you are looking for