ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to stop audio playing

Solved!
Go to solution

Hi guys,
To simplify, I play an audio file when I click on the Play audio button.
Now when I click on the Stop Audio button, I want the audio that's playing to stop.
How do I do it please?
Thanks

Download All
0 Kudos
Message 1 of 6
(2,427 Views)

Try using the low-level API. See the examples at the bottom page of Sound Output Configure VI

-------------------------------------------------------
Applications Engineer | TME Systems
https://tmesystems.net/
-------------------------------------------------------
https://github.com/ZhiYang-Ong
Message 2 of 6
(2,386 Views)

R-click the Express VI and Show front panel, convert it to a normal VI, go into the new sub-vi to see what code is actually run. What you need is to get that task and end it before hand. (i.e. use some low level vi's as mentioned)

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

Qestit Systems
Certified-LabVIEW-Developer
Message 3 of 6
(2,352 Views)

you may look at

 

"C:\Program Files\National Instruments\LabVIEW xxxx\examples\Graphics and Sound\Sound\Sound Player.vi"

Message 4 of 6
(2,323 Views)
Solution
Accepted by topic author Ngouda

@alexderjuengere wrote:

you may look at

 

"C:\Program Files\National Instruments\LabVIEW xxxx\examples\Graphics and Sound\Sound\Sound Player.vi"


you then want to build around this e.g.

 

Spoiler
event-sound.png
Message 5 of 6
(2,313 Views)

Hi @ZYOng, @Yamaeda, @alexderjuengere
Thanks you all for your reply, that works now 🙂
Sincerly

Message 6 of 6
(2,279 Views)