10-26-2009 01:26 PM
Hi,
The play sound file.vi locks the loop its in for an indeterminate amount of time, somewhere between 0.5 to 2 seconds. This only happens when another loop is running in parallel. I need to be able to stop the playback in less than 1 second. Once the play sound file.vi has been used, the start and stop vi's can be used with no slowing of the loop.
Is it possible just open the .wav file and not play it immediately?
I tried opening the file using the sound file open.vi and creating a task id using the sound output configure.vi but the start sound output.vi would not play the sound following this method for task id declaration.
This is driving me nuts, any help would be greatly apprecitated!
Thanks a lot!!
10-26-2009 02:31 PM
The .wav file is taking awhile to load, is that the issue? I have never had an issue with a sound file slowing down my loop as much as a second...but I would imagine that would change if I played a longer file. Try throwing the play sound file in a different thread and using a notificaton:
Your main loop won't be lagged at all using this method.
-nickerbocker
10-26-2009 05:16 PM
01-14-2013 03:38 PM
I leave an example that can provide, use it in your program