LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop Play Waveform

Solved!
Go to solution

Hi,

I want to to read a .wav file, play it and then stop it when I press a button.

The problem is that when I press the Stop button the sound doesn't stop immediatly but only when it reaches the end of the file. How can I solve this issue?

(The FALSE case structure in my VI is empty)

 

Thanks!

0 Kudos
Message 1 of 3
(4,654 Views)

You could try breaking up the file into something like 100ms parts.  You can then just loop on the parts, writing them to the sound card.  Then you can stop whenever you want.  You will want to get away from the output sound express VI to do this properly.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 3
(4,635 Views)
Solution
Accepted by topic author biomed87

Do not use the express vi, use the sound output vis instead. Here is a quick way to do it.

 

Ben64

Message 3 of 3
(4,622 Views)