02-07-2011 12:54 PM
Hello all.
I am trying to play a .wav file to indicate to the user my program is done. I put a control on the front panel to allow the user to select the file to play. The problem is that it works with some .wav files but not all. I have a small collection with a star trek theme, but it only plays one out of the bunch. Any ideas?
Mike
02-07-2011 01:05 PM
It's hard to say without seeing your code, but maybe it has something to do with the resolution or sample rate of your .wav files?
Can you verify the sample rate and resolution of the file that works against the ones that aren't working?
Also, how are you playing these? With the Play Waveform express vi?
02-07-2011 01:12 PM
Maybe this will work?
02-07-2011 01:42 PM
I used the Sound File Info vi to pull up some information on the files that don't play. specifically the Samples per channel and bits per sample are zero on those files. The interesting thing about is that media player will play them, but LabVIEW won't.
So is the solution to find better wave files?
02-07-2011 01:46 PM
Maybe... Can you post one of the .wav files? I could give it a try if you want.
02-07-2011 01:53 PM
I think I got this figured out ......
Thanks
Mike
02-07-2011 01:54 PM
Maybe you have a compressed wav file? Try this: http://forums.ni.com/t5/LabVIEW/play-sound-file/td-p/715538/page/2 The first post from Jared_B on the second page is what I'm referring to.
02-07-2011 02:00 PM
It looks like your wav files are compressed. I tried converting beep05.wav with the instructions in the link I previously posted. Now it works. I bet that's all it is. Good luck.
02-07-2011 02:14 PM
Could be, but your trick worked. Thanks
🙂
Mike
02-07-2011 03:42 PM
The wav file header is wrong. Take a look here
https://ccrma.stanford.edu/courses/422/projects/WaveFormat/
