This was a beginning of such a good discussion, that ended so abruptly. Sorry for raising this corpse, but I have a .wav file that I stream for an hour long as a stress signal, then run a ref signal for 10 seconds, and stream the 1hr long file again. Eventually the .wav file stops playing and the Sound Output Write.vi is hung. It's not timing out (I thought the default timeout is 10s) it's just sitting there and I can't even end it. My guess is the buffer is overflown and there is no audio output from the external usb soundcard (I use the nuforce).
I was writing 2000 samples / iteration (the NI example has 2500) and now scaling down to 1000, to see if this helps. When I switch over from one file to another, I clean everything up by Sound File Close.vi, Sound Output Wait,vi and Sound Output Clear.vi. I get the info of the file by Sound File Info,vi and feed it to the Sound Output Configure.vi and set it to continuous Samples
Some snippets are below