11-05-2014 10:19 AM
My Labview exe will not play sound
that is in the project when i edit the program and run i can play wav files
but after i build the exe (using the in project build) the sound no longer works.
-kurt
Solved! Go to Solution.
11-05-2014 11:20 AM - edited 11-05-2014 11:21 AM
@auerdoan wrote:
My Labview exe will not play sound
that is in the project when i edit the program and run i can play wav files
but after i build the exe (using the in project build) the sound no longer works.
-kurt
Any kind of error handling? My guess is that the paths changed on you and the executable no longer knows where the .wav files are. But you won't know this unless you make your own error handler because automatic error handling is turned off in an executable by default.
11-05-2014 01:04 PM
Is that really necessary when i run the program the sound works.
it just that when its built i get no sound.
i ahve a feeling its somthing with the build instructions
it does this on two computers
I dont mind building an installer but that has not resolved the issue
nor did i see any option to install sound vi's in the installer
11-05-2014 01:15 PM
@auerdoan wrote:
Is that really necessary when i run the program the sound works.
it just that when its built i get no sound.
i ahve a feeling its somthing with the build instructions
it does this on two computers
I dont mind building an installer but that has not resolved the issue
nor did i see any option to install sound vi's in the installer
Is it necessary? Well without error handling we're just guessing, right? It's up to you whether you think it's necessary or not, but you probably wouldn't even have to come to the forum to ask your question if you built some sort of simple error handling.
11-05-2014 01:17 PM
I bet it's the classic "compiled exe dont find my file"-problem. If the sound file is in the project structure the path is slightly different in the compiled exe which you need to handle.
/Y
11-05-2014 01:21 PM - edited 11-05-2014 01:24 PM
Is it necessary? Well without error handling we're just guessing, right? It's up to you whether you think it's necessary or not, but you probably wouldn't even have to come to the forum to ask your question if you built some sort of simple error handling.
easy cowboy,
for the heck of it i added a connection from the sound vi to a pop up that returned the path.
the result was correct the wav file is in the same directory as the exe. im still wondering the build needs to know this and how to verify.
I do appreciate the help
11-05-2014 01:23 PM
I had a similar problem with a test program at a customer where the built in PlaySound suddenly stopped working. I had to use a .net PlaySound-function instead.
/Y
11-05-2014 01:37 PM - edited 11-05-2014 01:53 PM
Hey both of you guys are right, i can admit i was hesitant to try the error handle
after the vi was built the directory changed! it should of been in the same as the exe
not the directory of the exe!!
thanks guys .. looks like i have a new asignment
11-05-2014 01:49 PM
I have to say we've all been through this is some way, shape or form.
FYI, the LabVIEW help has some really good guidelines on building applications. I just re-read them and forgot just how detailed they get. LabVIEW help --> Fundamentals --> Building and Distributing Applications.