I want to generate sound in precise time. The sound should be played after 100 ms of running the VI and the duration of playing sound should be 50 ms. I tried to use sound card to play the sound but the problem is that the playing time is vary between 60 to 80 ms instead of 50 ms. I used an indicator to find out the number of iterations for the while loop and it shows 5, so the I cannot expect less than 10 ms resolution for my VI. I searched for that and I found out this is related to how many percent of your resources are in use.
I should mention that I prefer to play a .wav file instead of generating sound using basic wave generator.
Is there any alternative solution to generate that sound in precise time using daq instead of sound card?
DAQ: NI-6052e
sound card: digital audio spdif 2-high definition audio device