Need Help playing a wav file on PDA

Does anyone have a SIMPLE example of playing a wav file on a PDA using LabView PDA. The only working example I can find from NI "Advance Sound Example for LabVIEW PDA for Pocket PC" is a jumbled of confusing functionality. I'm mainly looking for a simple "play" example, but a simple "record" example would be helpful also.
Thanks - Bruce

Hello,
Well, I looked through the example code I tried to break it down to the point where you could create a simple Play VI. Unfortunately, I don't have the PDA target, so I'm uncertain if the little example that I have attached will run or not. If not, I also took a screen shot so you can see what VIs I used. I'm pretty sure I only used VI's that I found on the example itself.
Good luck.
Attachments:
Play_Wav_PDA.vi ‏55 KB
Play_Wav_PDA.bmp ‏1029 KB

Similar Messages

  • Need help with audio wav file in multicam clip

    I created a multicam clip with 3 cameras with crappy, far away, room audio and 1 stereo audio wav file with 2 lavaliere mics of "good Audio" 1 lav left & 1 lav right. on one channel there is a lot of distortion from shirt ruffle etc.... but only at times. I would like to ride the mix and use sections of "good" audio and get rid of sections of "Bad" audio from the one channel. but, I cant figure it out. anyone??? I'm hoping Apple updates this issue soon with great audio support with "simultaneos multicam audio switching!!!" Please, Please Apple...

    You can do what you need right now, no need for Apple to do anything, they've already don it. Check this out.
    http://www.macprovideo.com/hub/final-cut/final-cut-pro-multiclip-audio-channel-e diting-1006

  • How to play a wav file to LINE_OUT with javax.sound.sampled

    Hello all,
    I need to play a wav file to LINE_OUT port, but not to the SPEAKER. I am trying to do this under window NT. For some reason I get false for isLineSupported(Port.Info.LINE_OUT). I am new to javax.sound so I might be doing something wrong. Here is the code that I am using to iterate through all availible mixers and check if LINE_OUT is supported by any of them:
    Mixer.Info[] mixers = AudioSystem.getMixerInfo();
    for(int i = 0; i < mixers.length; i++){
    Mixer mixer = AudioSystem.getMixer(mixers);
    if (mixer.isLineSupported(Port.Info.LINE_OUT)) {
    System.out.println("the port is supported");
    try {
    Port line = (Port) AudioSystem.getLine(
    Port.Info.LINE_OUT);
    catch(Exception ex){
    ex.printStackTrace();
    else{
    System.out.println("the port is not supported");
    Please help

    The new bugID of the request to implement Ports is: 4558938.
    (If you voted for the old bug id: 4504642, be sure to change your votes to this new bug report since the old one was closed as a duplicate of the new one.)

  • Play a .wav file fractional

    hi,
    i´m looking for a solution to play a .wav file.
    the special what i need is, that i want to jump to concrete points on the timeline.
    or can i seperate the timeline of a .wav file?
    martin

    Hi Martin
    this could help you starting. For the case you can't open LV 8.2- VIs, i attach the BD- picture.
    greets, Dave
    Message Edited by daveTW on 06-14-2007 10:26 AM
    Greets, Dave
    Attachments:
    play sound part_FP.png ‏10 KB
    play sound part.vi ‏50 KB

  • Playing a wav file (byte array) using JMF

    Hi,
    I want to play a wav file in form of a byte array using JMF. I have 2 classes, MyDataSource and MyPullBufferStream. MyDataSource class is inherited from PullStreamDataSource, and MyPullBufferStream is derived from PullBufferStream. When I run the following piece of code, I got an error saying "EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x7c9108b2, pid=3800, tid=1111". Any idea what might be the problem? Thanks.
    File file = new File(filename);
    byte[] data = FileUtils.readFileToByteArray(file);
    MyDataSource ds = new MyDataSource(data);
    ds.connect();
    try
        player = Manager.createPlayer(ds);
    catch (NoPlayerException e)
        e.printStackTrace();
    if (player != null)
         this.filename = filename;
         JMFrame jmframe = new JMFrame(player, filename);
        desktop.add(jmframe);
    import java.io.IOException;
    import javax.media.Time;
    import javax.media.protocol.PullBufferDataSource;
    import javax.media.protocol.PullBufferStream;
    public class MyDataSource extends PullBufferDataSource
        protected Object[] controls = new Object[0];
        protected boolean started = false;
        protected String contentType = "raw";
        protected boolean connected = false;
        protected Time duration = DURATION_UNKNOWN;
        protected PullBufferStream[] streams = null;
        protected PullBufferStream stream = null;
        protected final byte[] data;
        public MyDataSource(final byte[] data)
            this.data = data;
        public String getContentType()
            if (!connected)
                System.err.println("Error: DataSource not connected");
                return null;
            return contentType;
        public void connect() throws IOException
            if (connected)
                return;
            stream = new MyPullBufferStream(data);
            streams = new MyPullBufferStream[1];
            streams[0] = this.stream;
            connected = true;
        public void disconnect()
            try
                if (started)
                    stop();
            catch (IOException e)
            connected = false;
        public void start() throws IOException
            // we need to throw error if connect() has not been called
            if (!connected)
                throw new java.lang.Error(
                        "DataSource must be connected before it can be started");
            if (started)
                return;
            started = true;
        public void stop() throws IOException
            if (!connected || !started)
                return;
            started = false;
        public Object[] getControls()
            return controls;
        public Object getControl(String controlType)
            try
                Class cls = Class.forName(controlType);
                Object cs[] = getControls();
                for (int i = 0; i < cs.length; i++)
                    if (cls.isInstance(cs))
    return cs[i];
    return null;
    catch (Exception e)
    // no such controlType or such control
    return null;
    public Time getDuration()
    return duration;
    public PullBufferStream[] getStreams()
    if (streams == null)
    streams = new MyPullBufferStream[1];
    stream = streams[0] = new MyPullBufferStream(data);
    return streams;
    import java.io.ByteArrayInputStream;
    import java.io.IOException;
    import javax.media.Buffer;
    import javax.media.Control;
    import javax.media.Format;
    import javax.media.format.AudioFormat;
    import javax.media.protocol.ContentDescriptor;
    import javax.media.protocol.PullBufferStream;
    public class MyPullBufferStream implements PullBufferStream
    private static final int BLOCK_SIZE = 500;
    protected final ContentDescriptor cd = new ContentDescriptor(ContentDescriptor.RAW);
    protected AudioFormat audioFormat = new AudioFormat(AudioFormat.GSM_MS, 8000.0, 8, 1,
    Format.NOT_SPECIFIED, AudioFormat.SIGNED, 8, Format.NOT_SPECIFIED,
    Format.byteArray);
    private int seqNo = 0;
    private final byte[] data;
    private final ByteArrayInputStream bais;
    protected Control[] controls = new Control[0];
    public MyPullBufferStream(final byte[] data)
    this.data = data;
    bais = new ByteArrayInputStream(data);
    public Format getFormat()
    return audioFormat;
    public void read(Buffer buffer) throws IOException
    synchronized (this)
    Object outdata = buffer.getData();
    if (outdata == null || !(outdata.getClass() == Format.byteArray)
    || ((byte[]) outdata).length < BLOCK_SIZE)
    outdata = new byte[BLOCK_SIZE];
    buffer.setData(outdata);
    byte[] data = (byte[])buffer.getData();
    int bytes = bais.read(data);
    buffer.setData(data);
    buffer.setFormat(audioFormat);
    buffer.setTimeStamp(System.currentTimeMillis());
    buffer.setSequenceNumber(seqNo);
    buffer.setLength(BLOCK_SIZE);
    buffer.setFlags(0);
    buffer.setHeader(null);
    seqNo++;
    public boolean willReadBlock()
    return bais.available() > 0;
    public boolean endOfStream()
    return willReadBlock();
    public ContentDescriptor getContentDescriptor()
    return cd;
    public long getContentLength()
    return (long)data.length;
    public Object getControl(String controlType)
    try
    Class cls = Class.forName(controlType);
    Object cs[] = getControls();
    for (int i = 0; i < cs.length; i++)
    if (cls.isInstance(cs[i]))
    return cs[i];
    return null;
    catch (Exception e)
    // no such controlType or such control
    return null;
    public Object[] getControls()
    return controls;

    Here's some additional information. After making the following changes to MyPullBufferStream class, I can play a wav file with gsm-ms encoding with one issue: the wav file is played many times faster.
    protected AudioFormat audioFormat = new AudioFormat(AudioFormat.GSM, 8000.0, 8, 1,
                Format.NOT_SPECIFIED, AudioFormat.SIGNED, 8, Format.NOT_SPECIFIED,
                Format.byteArray);
    // put the entire byte array into the buffer in one shot instead of
    // giving a portion of it multiple times
    public void read(Buffer buffer) throws IOException
            synchronized (this)
                Object outdata = buffer.getData();
                if (outdata == null || !(outdata.getClass() == Format.byteArray)
                        || ((byte[]) outdata).length < BLOCK_SIZE)
                    outdata = new byte[BLOCK_SIZE];
                    buffer.setData(outdata);
                buffer.setLength(this.data.length);
                buffer.setOffset(0);
                buffer.setFormat(audioFormat);
                buffer.setData(this.data);
                seqNo++;
        }

  • Playing a .wav file from email attachment

    I am trying to play a .wav file that is attached to an email, and i get "The document conversion failed". Am I missing something? What do I need to do to be able to play .wav files that are sent to me via email?

    I have the same request.
    We have a new Panasonic phone system that sends out .wav voicemail files.
    Our company's Curve's play the wav fine.
    Our company's BOLDs ... DO NOT.

  • Help Playing a MP3 files in a java application!

    Hey, i need help playing MP3 files in a JFrame application. Any help is apperciated.

    Google for JLayer.

  • How to play a wave file through the DAQ board?

    Hi there,
    we want to play a wave file that is saved on the harddrive via the DAQ board. Means we want to connect a amp to the analog output of the DAQ to amplify the sound and play it through a speaker.
    We couldn't find any VI that does that. Can anybody tell us how to play a wave file, or perhaps even send us a VI that can do that?
    Thanks a lot for your help
    Martin - Physical Optics Corporation

    Hi Martin,
    The only example that I could find on how to do this was using our
    older Traditional DAQ drivers version 6.9.3.  If you're using Traditional
    DAQ drivers, the vi can be found here. 
    The example reads a 8-bit mono .wav file (an example .wav file is included in the .zip file) and writes it to the analog out of your DAQ card.  I've updated the
    example to work with our newer DAQmx drivers and attached it here.  
    I hope this helps,
    Paul C.
    Message Edited by Paul C. on 08-14-2007 05:47 PM
    Attachments:
    daqmx_wav_file_to_ao_output.zip ‏27 KB

  • Playing a WAVE file after making a phone call.

    Hi everyone..
    I'm trying to play a wav file after making a phone call. I was able to make the call. But I get an exception when i try to paly a wav file..
    Can any one tell me where I've gone wrong..
    This is the code which plays the audio file..(I downloaded it by the way.. and it's working fine when used as a seperate program)
    import java.io.File;
    import java.io.IOException;
    import javax.sound.sampled.AudioFormat;
    import javax.sound.sampled.AudioInputStream;
    import javax.sound.sampled.AudioSystem;
    import javax.sound.sampled.DataLine;
    import javax.sound.sampled.FloatControl;
    import javax.sound.sampled.LineUnavailableException;
    import javax.sound.sampled.SourceDataLine;
    import javax.sound.sampled.UnsupportedAudioFileException;
    public class PlayWave extends Thread {
         private String filename;
         private Position curPosition;
    //30000000(7324.21 kb)
         private final int EXTERNAL_BUFFER_SIZE = 524288; // 128Kb
         enum Position {
              LEFT, RIGHT, NORMAL
         public PlayWave(String wavfile) {
              filename = wavfile;
              curPosition = Position.NORMAL;
         public PlayWave(String wavfile, Position p) {
              filename = wavfile;
              curPosition = p;
         public void run() {
              File soundFile = new File(filename);
              if (!soundFile.exists()) {
                   System.err.println("Wave file not found: " + filename);
                   return;
              AudioInputStream audioInputStream = null;
              try {
                   audioInputStream = AudioSystem.getAudioInputStream(soundFile);
              } catch (UnsupportedAudioFileException e1) {
                   e1.printStackTrace();
                   return;
              } catch (IOException e1) {
                   e1.printStackTrace();
                   return;
              AudioFormat format = audioInputStream.getFormat();
              SourceDataLine auline = null;
              DataLine.Info info = new DataLine.Info(SourceDataLine.class, format);
              try {
                   auline = (SourceDataLine) AudioSystem.getLine(info);
                   auline.open(format);
              } catch (LineUnavailableException e) {
                   e.printStackTrace();
                   return;
              } catch (Exception e) {
                   e.printStackTrace();
                   return;
              if (auline.isControlSupported(FloatControl.Type.PAN)) {
         FloatControl pan = (FloatControl) auline.getControl(FloatControl.Type.PAN);
                   if (curPosition == Position.RIGHT)
                        pan.setValue(1.0f);
                   else if (curPosition == Position.LEFT)
                        pan.setValue(-1.0f);
              auline.start();
              int nBytesRead = 0;
              byte[] abData = new byte[EXTERNAL_BUFFER_SIZE];
              try {
                   while (nBytesRead != -1) {
              nBytesRead = audioInputStream.read(abData, 0, abData.length);
              if (nBytesRead >= 0)
                   auline.write(abData, 0, nBytesRead);
              } catch (IOException e) {
                   e.printStackTrace();
                   return;
              } finally {
                   auline.drain();
                   auline.close();
         }I inserted
    new PlayWave("greeting.wav").start();In to a method an called this method in the program where i send commands to the modem.
    These are my modem commands
    send("ATZ");
        expect("OK");
    //Enable voice mode
        send("AT+FCLASS=8");
        expect("OK");
    //Dial the number
        send("ATDT"+number);
        expect("OK");
    //Choose encoding method //This is the default
        send("AT+VSM=140,8000,0,0");
        expect("OK");
    // start sending audio data
        send("AT+VTX");
        expect("OK");
    PlayAudio();
    send("ATH");The size of my audio file is 100 kb.I'm using a 56 K intel externel voice modem connected to a serial port.I wonder if it's because the buffer is too big. If anyone tried this and succeded please correct me.
    Thankyou in advance
    goodnews

    Hi goodnews!
    Did I understand well? Can You record the speech? This is what I want!
    Can you help me and send me sample code?
    This would be a big help for me!
    Thank You!
    rflair

  • Play a wav file once

    how do I play a wav file just once using the play sound
    file.vi. i keep getting it to repeat over and over
    thanks

    First may I recommend some reading here. This is not meant to be cocky just to help you.  
    Getting Started with NI LabVIEW Student Training
    LabVIEW101
    Second I have included sort of template. Notice the wire that ends in the while loop. This will ensure that the wav is played before the loop starts.
    Good luck with your Labview labwork
    Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
    (Sorry no Labview "brag list" so far)
    Attachments:
    play wav file[2].vi ‏9 KB

  • This Adobe muse site file requires a newer version of Adobe Muse. I want to comeback to old version Adobe muse i need help to open my file thanks

    This Adobe muse site file requires a newer version of Adobe Muse. I want to comeback to old version Adobe muse i need help to open my file thanks

    Hi,
    You may need to design the site again in older version OR may be copy and paste in place from new to old except what is new in the latest version.
    Hope that helps!
    Kind Regards,

  • I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    I need help with a PDF file that is an image, the "Read Out Loud' option does not work, please help!

    You mean an image such as a scanned document?
    If that is the case, the file doesn't contain any text for Reader Out Loud to read. In order to fix that, you would need an application such as Adobe Acrobat that does Optical Character Recognition to convert the images to actual text.
    You can also try to export the file as a Word document or something else using ExportPDF which I believe offers OCR and is cheaper than Acrobat.

  • Need help in laoding flat file data, which has \r at the end of a string

    Hi There,
    Need help in loading flat file data, which has \r at the end of a string.
    I have a flat file with three columns. In the data, at the end of second column it has \r. So because of this the control is going to the beginning of next line. And the rest of the line is loading into the next line.
    Can someone pls help me to remove escape character \r from the data?
    thanks,
    rag

    Have you looked into the sed linux command? here are some details:
    When working with txt files or with the shell in general it is sometimes necessary to replace certain chars in existing files. In that cases sed can come in handy:
    1     sed -i 's/foo/bar/g' FILENAME
    The -i option makes sure that the changes are saved in the new file – in case you are not sure that sed will work as you expect it you should use it without the option but provide an output filename. The s is for search, the foo is the pattern you are searching the file for, bar is the replacement string and the g flag makes sure that all hits on each line are replaced, not just the first one.
    If you have to replace special characters like a dot or a comma, they have to be entered with a backslash to make clear that you mean the chars, not some control command:
    1     sed -i 's/./,/g' *txt
    Sed should be available on every standard installation of any distribution. At lesat on Fedora it is even required by core system parts like udev.
    If this helps, mark as correct or helpful.

  • Why cant I play embeded wave files in firefox but I can in explorer?

    I just embedded a wave file (Godsmack Voodoo) for my website & saved it but when I goto run teh intro no sound, But explorer plays it no problems? What is wrong with Firefox 9.01 & playing the embedded sounds?

    Can you post a link to a public page?
    Which code are you using to play that WAV file?

  • Subsequent play of WAV files from HTTP

    Hi,
    I have to subsequently play many WAV files from HTTP in a nokia series 60 emulator.
    Everything is ok for the first two files, but at the third I catch an exception:
    "java.io.IOException: exceeded the configured maximum number of connections"
    I tried two ways to load the files from HTTP:
    Manager.CreatePlayer(InputStream...)
    Manager.CreatePlayer("http:\\...")
    Below there is the code of the two methods I use. Please note that I try in every way to close the connection before open a new one!!!
    public void Method_1(String src, String type){
    int iLen=0;
    is = null;
    httpCon = null;
    byte[] bBuf;
    try {
    if (p != null) {
    if (p.getState() == Player.STARTED) {
    p.stop();
    p.removePlayerListener(this);
    p.deallocate();
    p.close();
    p=null;
    if (is!=null){
    is.close();
    is=null;
    if (httpCon!=null){
    httpCon.close();
    httpCon=null;
    httpCon = (HttpConnection) Connector.open(src);
    if (httpCon.getResponseCode() != HttpConnection.HTTP_OK) {
    System.out.println("Bad response code");
    return;
    System.out.println("Connection OK! (audio)");
    iLen = (int) httpCon.getLength();
    System.out.println("audio file length : " + iLen);
    is = httpCon.openInputStream();
    p = Manager.createPlayer(is, type);
    p.addPlayerListener(this);
    p.setLoopCount(1);
    p.prefetch();
    p.start();
    vc = (VolumeControl)p.getControl("VolumeControl");
    catch (MediaException ex) {
    ex.printStackTrace();
    catch (IOException ex) {
    ex.printStackTrace();
    public void Method_2(String src){
    try {
    if (p!=null){
    if (p.getState() == Player.STARTED)
    p.stop();
    p.deallocate();
    p.close();
    p=null;
    p = Manager.createPlayer(src);
    p.addPlayerListener(this);
    p.setLoopCount(1);
    p.start();
    vc = (VolumeControl)p.getControl("VolumeControl");
    catch (java.io.IOException e) {
    e.printStackTrace();
    catch (MediaException e) {
    e.printStackTrace();

    My question is:
    how can I load (from a HTTP server) and play more than two WAV files without crashing?
    Do I have to close the connection in a better way in order to re-open it without problems (and more than two times)?
    It is simply an emulator bug?
    Thanks.

Maybe you are looking for