LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to pause and play a sound at different times

Hi,

 

I use the sound file read function. It works well, I could set the duration of playing a wav file. I use it as a subvi in which in the main vi the user has to do something to get music. The problem is that he has always the same sound because I can't start the sound at other times than the beginning. I tried to use offset but the sound turns crazy.

 

Do you know a mean to pause the sound and when it is called back by the user, the sound plays at the time it stops before. Or if not if at least we could start the sound at different times than the beginning. I could use several wav files to do this but it is very long to do this for my purpose.

 

Thank you in advance for your help. 

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

As a tip. Then I program in Labview I Always go to help in the toolbar, and then select Show context help. Do not be afraid to use the "detailed help" option in the context help. Now open your music 1 VI. Locate the "Sound file read.vi", and look at the function for the position mode,  position offset inputs, and the offset output. By using shift registers and these variables you should be able to do that you want. You might have to use two shift registers. Both in the "main vi.vi" and in the "music 1.vi"

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 2 of 6
(2,739 Views)
 


Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
0 Kudos
Message 3 of 6
(2,739 Views)
Thank you I try this but it does not work. The sound turned crazy. Strange. Have you ever try this?
0 Kudos
Message 4 of 6
(2,718 Views)

Here is the principals. Modify as you need.

 



Besides which, my opinion is that Express VIs Carthage must be destroyed deleted
(Sorry no Labview "brag list" so far)
Download All
0 Kudos
Message 5 of 6
(2,682 Views)
Thanks.
0 Kudos
Message 6 of 6
(2,665 Views)