LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

no sound after build in LV 12

Solved!
Go to solution

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

0 Kudos
Message 1 of 9
(2,995 Views)
Solution
Accepted by topic author auerdoan

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 9
(2,980 Views)

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

0 Kudos
Message 3 of 9
(2,972 Views)

@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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
0 Kudos
Message 4 of 9
(2,965 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
Message 5 of 9
(2,960 Views)

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.

Bill

 

 

 

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 

0 Kudos
Message 6 of 9
(2,955 Views)

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

G# - Award winning reference based OOP for LV, for free! - Qestit VIPM GitHub

Qestit Systems
Certified-LabVIEW-Developer
0 Kudos
Message 7 of 9
(2,950 Views)

Untitled.jpg

 

non built.jpg

 

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  

 

 

Message 8 of 9
(2,943 Views)

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.

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 9 of 9
(2,936 Views)