LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

display elapsed time while .wav file playing

Hi,
is there a way to show the elapsed time while the .wav file is playing?  can't seem to get it to work using the elapsed time vi or find any examples.

thanks
0 Kudos
Message 1 of 5
(3,043 Views)
What are you using to play the WAV file? If you're using Windows Media Player in an ActiveX container then you should be able to use the get_currentPositionTimecode method.
0 Kudos
Message 2 of 5
(3,022 Views)
Hi,
i am playing the .wav file in LabView's vi called Play Waveform.  i have attached a vi.  if you import a wav file then hit play(hopefully you have a wav file to import because i cannot attach one).  i am wondering if there is a way in labview to display the elasped time as it is playing.
thanks
0 Kudos
Message 3 of 5
(3,014 Views)
Since you are using the Express VI to play the waveform you cannot do what you want. You would need to use the lower-level functions and play chunks at a time so you can monitor where you are. There are examples that ship with LabVIEW that show you how to use the lower-level functions.

A couple of comments regarding the code:
  • In your "Import" event the writing to the local variable of the graph is redundant. You're already writing the value to the indicator. Writing to the local variable serves no purpose.
  • In your "Import" even you are reading a file, but your prompt says "write".
  • In your "Play" event what is the purpose of the sequence structure?
  • In your "Play" event you have a wire from the local variable to the sequence frame border. What is the purpose of this wire?
0 Kudos
Message 4 of 5
(2,991 Views)
thanks for the answer.  this code was just copied and pasted into a vi that i could post.  this was just a piece of a more elaborate vi and thus your questions.
thanks
0 Kudos
Message 5 of 5
(2,983 Views)