accurate sound loop timing
Posted: Fri Feb 27, 2009 7:07 pm
Hi, I've been using Enterprise to build a standalone app that plays a small sound file repeatedly at regular intervals while a timer counts down. I have the code all worked out for the timing but I'm having a problem with the accuracy of the intervals between the sounds.
The timer keeps the time correctly, so that's not the problem, but the sounds sometimes come at irregular intervals. And very often the right number of repetitions are not accomplished in the time, for instance, if I have it set to repeat 20 times per minute, I might get 19 or 21 repetitions. Anyone have any suggestions or ideas?
I'm thinking that the problem might be related to how the app uses the computer's resources because the problem is more or less severe depending on what computer is running it (really bad on a machine running Vista that can already barely handle Vista). Is there any way of reserving a certain amount of the computer's resources just for this app while it is running?
Any other ideas or explanations?
Thanks!
The timer keeps the time correctly, so that's not the problem, but the sounds sometimes come at irregular intervals. And very often the right number of repetitions are not accomplished in the time, for instance, if I have it set to repeat 20 times per minute, I might get 19 or 21 repetitions. Anyone have any suggestions or ideas?
I'm thinking that the problem might be related to how the app uses the computer's resources because the problem is more or less severe depending on what computer is running it (really bad on a machine running Vista that can already barely handle Vista). Is there any way of reserving a certain amount of the computer's resources just for this app while it is running?
Any other ideas or explanations?
Thanks!