04-20-2010 06:26 PM
Hi,
I am a newbie and I am working on a project that opens a .wav file and plays it (with volume control). I found all the sound related examples to be extremely helpful and I can just modify the Sound file to Sound output.vi example for the purpose of my project.
I am running into a problem where the vi does not stop at the end of the wav file, and it seems to loop for a while. the wav file i've been using was over a min long (and it was converted from a data file to a wav file, if that matters). I've attached my modified vi here, and appreciate any help.
Thank you!
christy
Solved! Go to Solution.
04-21-2010 10:52 AM
Christy,
I think the functionality you are looking for is that you want to play your wav file in it's entirety every iteration of the while loop. If this is the case then you just need to expand the While Loop to encompass the Sound Output Configure and the Sound Output Wait VIs and change the configure VI to Finite Samples instead of Continuous Samples. I have attached a picture showing what this looks like. If you are just wanting to play your file once and be done with it, then you can change the configure VI to Finite Samples and just get rid of the While Loop completely and then the VI will just run once. Hope this helps!
04-21-2010 11:11 AM
To the OP and the NI AE
Please go to help in the toolbar. Then select find examples, and search for sound. Locate the "Sound File to Sound Output.vi"
04-21-2010 11:47 AM
Coq Rogue,
That's what she started with. Now she's using the VI that she attached in her first post. My post solved the issue that she is seeing. Thanks for the help though!
04-21-2010 01:42 PM
Thank you! It fixed my problem.
=D
04-21-2010 02:28 PM
G-Money Let us not turn this into a peeing contest. But Your suggestion is not very very good Labview practice since it open X number of sound card connections without closing them then finished. I am uncertain how big impact this will have on say memory usage. But it always a a good practice to not learn new Labview programmers bad habits. Thanks for the help though!
And also Christy post again if got more problems. I have a lot experience with the Labview sound system.