At 2:42 PM -0700 1/3/06, Cory wrote:
This is a part of my app that plays a sound at a certain tempo. Problem is, it doesn't play straight.. It misses beats, some are closer to others it's like the computer's drunk... This is put in a thread who's priority is set to 10, 100 or even 1000.. once it reaches a beat it checks an array to see if it should play a sound:
How exactly does it do that? Can you post the code in the thread (which I imagine is quite short)? (No, I don't want to download the example project.)
A thread in a tight loop isn't a bad approach to this, albiet rather processor-hungry. Another approach would be a timer with a very short period. When the timer fires, and it sees that it's within a period or two of the time it should play, then it goes into a tight loop and waits for the proper time to come.
HTH, - Joe -- Joseph J. Strout [EMAIL PROTECTED] _______________________________________________ Unsubscribe or switch delivery mode: <http://www.realsoftware.com/support/listmanager/> Search the archives of this list here: <http://support.realsoftware.com/listarchives/lists.html>
