LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Stop and replay audio using Play Waveform

HI! I have a music player project in LabView Community. I managed to play a wav file from a relative path that is obtained from a subVI only using Play Waveform and now I want to pause, replay and stop that Play Waveform while the song is playing. How can I do that? I tried to implement a solution from this forum with a state case and shift registers. I used idle, start, stop and close cases for an enum constant and the sound output vis instead of Play Waveform, but the problem was with the path indicator from the subVI. 

Download All
0 Kudos
Message 1 of 4
(142 Views)

LabVIEW ships with many examples.  If you open LabVIEW, click "Help", "Find Examples", and use "sound" as a search parameter, you should find "Sound File to Sound Output", which reads the sound file in "chunks", playing each "chunk" as it is read.  The sound that results is "smooth", even though you read and write in finite "chunks" of data.  This "magic" is built into the Sound Output Write and Sound File Read functions.

 

Note -- when you use an example file, I recommend you do a "Save As" when you open it, and save it under a new name in your LabVIEW folder, close the Example file, and then work with the one you just saved.  This "preserves" the Example, "just in case".

 

Bob Schor  

Message 2 of 4
(121 Views)

I answered a similar question on this Forum yesterday.  Why don't you look for a recent post here with a similar title?  [Maybe a classmate?]

 

Bob Schor

0 Kudos
Message 3 of 4
(79 Views)

No, this is the very common crosspost from Reddit issue…

(I consider them mostly as SPAM.)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 4 of 4
(57 Views)