07-09-2012 11:36 AM
While playing with a *.wav file to perform an FFT on the data, I tried running this VI. Labview then crashes. No error.
07-10-2012 05:29 PM
What kind of machine are you using? Can you describe how you obtain the wav file, and if you can play it in windows normally.
I found in the documentation that the "Play Sound File" VI requires DirectX 8.0 or later and on Linux you need the Open Sound System (OSS) driver installed.
http://zone.ni.com/reference/en-XX/help/371361H-01/lvpict/playsoundfile/
07-10-2012 06:02 PM
Dell Precision T3500
Win7
NI example finder
File works fine in other VI's. This one crashes.
07-11-2012 10:19 AM - edited 07-11-2012 10:20 AM
Which version of LabVIEW are you using? I'm using LabVIEW 2011 SP1, and I ran the "Interactive Play Sound File.vi" from the example finder and the VI worked for me.
Are you just trying to play a sound file in your own VI? If so, the DLL library call from the example could be causing the crash. It could also be that your program isn't crashing, but just terminating before your sound file has a chance to play.
There is an easier way to play a sound file, just use the "Play Sound File.vi". You may also need to use the "Sound Output Wait.vi" to prevent your LabVIEW program from terminating before the sound has a chance to play. I've attached a picture of the setup I'm refering to.
07-11-2012 10:34 AM
2011 SP1
No, I was trying to extract the wave form as a matrix so I could run an FFT on the waveform.
Similar to Octave3.6.2 wavread() function.
07-11-2012 01:03 PM
Oh, ok. I found this forum post that has code on how to extract the waveform data from a wav file:
http://forums.ni.com/t5/LabVIEW/Audio-File-Wav-Filtering/m-p/1949637
You'll want to use the "Sound File Read.vi" or "Sound File Read Simple.vi". The output from these VIs is an array of waveform data.
07-11-2012 01:45 PM
That is all well and fine. I have found other ways of manipulating the data.
The original intent of the post was to make someone aware of a bug in the example vi.
That's all.
07-11-2012 01:51 PM
Oh, I'm sorry I misunderstood your intent.
I opened the example from the example finder and was unable to reproduce the crash. What steps do you take that causes the error?
07-11-2012 02:18 PM
Labview>>Find Examples
Search for WAV
Select Interactive Play Sound File.vi
Run Vi>> Select sound file.
VI then crashes.
I turned on highlight execution, it crashes at, "Call Library Function Node"
Could it be that it's because I am on a 64bit system and LV is running the 32 bit version?
07-11-2012 02:33 PM
That could be the problem, from what you described its just an error in trying to find and load the DLL. In those cases, it does cause LabVIEW to crash.